Feeling like a failure

So I’m not sure if this is because stubbornness comes from both sides, or if it’s the age, or if it’s the fact that she’s coping with no longer being an only child (baby bro is 4 months now). My 3.5 year old daughter has become a monster. I’m disappointed and feel like I’ve failed as a parent because I don’t feel like I know how to manage the behavior and I’m losing patience trying to be nice and explain things. Like she just started hitting her baby brother for no reason. I asked her why once because she literally came up out of no where and hit his head. She said ‘because it’s funny’. Like wtf did she learn that? I tell her it’s not nice and that we don’t hit people especially our family. I try to make her think if it was the other way around how she might feel if baby brother hit her. At one time she said she wouldn’t like that, but she keeps doing it. I’m not sure if she’s become super jealous or if she’s not feeling like she can express her anger and upset. I know she’s trying to push the limits and get a reaction from us but even when we talk about it she’ll just keep doing it until I take something away or remove her from the situation. Then she’ll cry and throw a temper tantrum. It’s just not very easy to redirect these tantrums compared to when she was younger. She’ll keep on crying and it happens like multiple times a day when she’s not getting her way. I just want my sweet baby girl. I’m also freaking out because her older cousins she looks up too are probably not good influences at times. My 7 year old nephew doesn’t listen and hits his younger brother in front of my daughter. Are other 3.5 year old toddlers doing this too? I just don’t know what’s normal and I’m at a loss as to what I can do.