There was a time when there was controversies about this topic. Is it good to spare the rod? Can Some children learn without the rod?. I guess this controversies arose because of the extreme means of punishment some parents used as a means to correct their children. Things like hot iron or barbed wires.
Be that as it may(😅), kids are meant to be corrected when they go astray but not brutally. One other thing parents forget to do is tell the kids why they are being punished.