A friend invited my family to a very small outdoor gathering for the 4th and we went. She did not invite another good friend of mine who is also a mutual friend. I hesitated whether to mention it to the uninvited friend and ultimately didn't but then it came out and it's fine but I feel like it would have been better if I had said something so it didn't seem like I was hiding it. But it felt weird to say something at the time. How do you usually handle these things?

I think it all depends on the interactions. If the uninvited friend asked specifically what you were doing for the 4th, I wouldn't volunteer it. If she specifically asked, I would tell her the truth. Generally I try to not give a ton of detailed info to people. If they want a playdate on the weekend and we're stacked up, I just say 'oh man, we're no good this weekend. how about X date?' and bounce it back to them. I just feel like giving really specific info on exactly what you're doing and when can lead the other person to try to say 'oh, but what about before that or after that'. I'd prefer to just say a general non available and suggest another time. Sorry to babble.
That is awkward OP but ultimately the host is not obligated to include the mutual friend. Perhaps they just don’t want to expose themselves to too many people?
I would have done the same thing OP.