Don’t get me wrong. Both ways work, and more modern pedagogy builds on the lessons learned from these approaches, but the best way to deal with crime and punishment isn’t these methods, it’s to deal with children rather similar to how you would deal with an adult but then comfort them as though they are children. If that sounds weird to you just imagine how annoying it would be for you if your boss started complimenting you on every thing you do that aligns with what they want to cultivate in you. I know some people might like that, but most of us would feel like we were being treated like idiots. The effect is a little different in children, but some will still feel that way and others will grow up to be very compliment seeking and spend decades in therapy learning how they I be themselves.
What you’ll want to do is to calmly explain why X behaviour is amazing and how proud you are of it. When that is actually true, and then only for as long as it takes for your children to learn that saying thanks when someone give them something is good. Similarly you calmly explain why Y behaviour is terrible, but it’s not like you can’t use reasonable amounts of punishment to teach about consequences. By reasonable I mean things similar to “if you don’t stop hitting the cat in the head with your doll now that I’ve explained why not to do so 20 times, then I’m going to take the doll away for the rest of the day”.
The biggest influence, and most important advice, is consistency. If you say that you’re going to take away the doll for the rest of the day, or when you say no to ice cream, then you absolutely have to follow through. Except when you were wrong, or when you’ve greatly miscalculated the importance of something, and if you’re consistent enough otherwise, then this will simply teach your child that it’s ok to be wrong and admit it. On the flip side of this, you actually have to say yes. One of the biggest challenges I personally faced when I had my first child was that it’s ok to sometimes have ice cream along with your breakfast within modern pedagogy. But it turned out that by saying yes when there is no reason not to, then it becomes really easy to say no because a no is just accepted as your offspring knows that it won’t always be a no.
I think a lot of good parenting is working on yourself though. I mean, why are you getting worked up over what a 4 year old is doing? You have an infinite amount of patience compared to them.