A number of countries have now outlawed smacking or spanking of children. This is the correct position. It is never ok to hit a child.
“But my parents hit me and look I turned out ok” is the common retort. The fact that you think it is ok to hit a child suggests you didn’t turn out ok. Since you’re going to use an anecdote as evidence, what about all the children who weren’t hit by their parents? They turned out ok.
It is unnecessary to hit a child. There are more effective alternatives. It is time to stop justifying horrendous behaviour and recognise excuses for such practices have been rendered invalid by 50 years of data.