One of the worst things you can do to a dog and should avoid at all costs is striking them. Hitting your pup will do nothing but hurt them physically and mentally. Our pets have emotions similar to ours. They can be anxious, sad, depressed, or afraid, and physical punishment will bring out all of these emotions, cause mental disorders, and make them aggressive.
Dogs will try to protect themselves, which results in biting… but honestly, who can blame them? You wouldn’t want to be backed into a corner and physically threatened. There’s also no reason to do this – with proper training techniques, classes, and tutorials available; you can achieve what you want without violence.