18 month old harming self.

Okay guys, i don’t really understand where this behaviour comes from. Within the past few weeks she’s started punching herself in her head while saying bad, she will grabs at her hands aggressively while saying bad. It’s like she’s harming herself because she thinks she’s bad and I just don’t get where it’s coming from, she spend 90% of the time in my eyesight and neither her father or I discipline her in any negative way, we don’t yell at her, we try to not use the word bad rather than saying that’s not nice, you’re not being nice or this isn’t how we act. Her behaviour has spiked 100% and I know terrible twos are coming but this is just odd to me. When my 9 year old step son even goes near her she freaks, screams and starts flailing her hands and I cant help but think somethings scared her that he might of done, she’s never had anything questionable bruises or marks of any sort. Obviously the odd time she will bump her leg but that’s about it. This behaviour is just so odd and came full force, am I crazy for even questioning if something’s happened? She used to be at her brothers hip and loved playing with him and now she doesn’t want to be near him most of the time, there’s still moments where she will play with him but only if he’s laying on the ground and she will tickle him and be fine near him, he’s a great big brother most of the time but there’s moments I find when he try’s to override me as a parent and when she’s being loud and noisy he will start to yell at her to be quiet (which has also just started recently) and I of course correct him and explain she’s only old enough to understand so much and she’s just starting to realize that she can make noise and we have to accept that she can’t sit there on mute all day.

Edit

Just to add I am not in denial and it’s not that she’s petrified of her brother, she just gets angry and flips her shit so I wasn’t sure if she’s trying to express that he’s getting in her personal space to much or if she’s trying to keep him away bc somethings happened. I of course wanted to share what’s been going on with people who are looking in from the outside or have experience in this department before making any rash decisions and pointing a finger at my step son so the “it doesn’t take a genius to figure out that he’s hitting my daughter” isn’t called for, obviously that is a possibility that’s what happening but like I said, I’ve never seen anything on her as in bruises, scratches, marks of any sort so I just wasn’t sure if this is part of the terrible two phase and she’s just learning that she can express negative emotions like that or if it’s something I seriously have to keep an eye out for... he’s never alone with her for more than a few minutes or I’m somewhere I can’t hear what’s going on.