Don't spank your kids. It has no benefit, and many negative effects.
> Although some studies have found no relation between physical punishment and negative outcomes, and others have found the relation to be moderated by other factors, no study has found physical punishment to have a long-term positive effect, and most studies have found negative effects.
See here for a useful meta-analysis: https://link.springer.com/article/10.1007/s10567-005-2340-z
I am so glad that in my country physical abuse of the child is a punishable offense.