Instead of hitting my 🐕 dog when he is bad, I push his neck to the ground and hold it there until he submits to me.  I use a firm voice to say, “Bad.”  If his crime is really bad, I put him in “time out” as well, for a couple of minutes.

When he submits to me, he is learning that I am the leader of his pack, the top dog, the Alpha… This is the natural behavior of dogs in the wild.