Does beating a child make them better behaved?
I personally do not think so. Beating a child has a lot of cons and no pros, in my honest opinion.
The child will become more distant and resentful towards you.
The child will also become sneaky about a lot of things.
I'm not sure hitting a child has ever changed anything. And I also believe that there are better ways to handle things.
Dialogue: Speak respectfully to your child and let them understand that you aren't happy with something they did. Propose a better way for them to go about it. Also find out why they went about it the way they did.
Then I think you all should live exemplary lives. Children learn a lot from their parents.