According to research, spanking isn't effective and negatively affects kids. DH and I were both spanked, and neither of us feel that we were negatively affected by it in the long term. However, we've never spanked our kids.
https://www.nytimes.com/2018/11/05/health/spanking-harmful-study-pediatricians.html
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3447048/