Terrible acting 4 year old

I’m at a loss. I’m miserable. I’m due any day now with our 3rd. Our oldest is making me lose my mind. She definitely gets attention, isn’t getting left out, gets to do fun things, make her own choices and literally everything I’ve read to do but she’s so mean to us. We do time outs sometimes or take toys away. Usually I’ve been trying to just talk it out and that works some of the time but usually she just yells at me and doesn’t listen at all. Today she decided to hit me several times once on the head. She doesn’t get spanked but is that what I need to do?? We don’t hit or even play that way because we don’t want our kids hitting so I have no clue where this is coming from. She has been already making life hard on us for weeks by arguing, saying no to everything, refusing to use the potty, lying, and more. Her doctor said that the defiance should go away a month or two after baby gets here but that was before the hitting. Can someone please tell me some advice..