@cristineshaw2,
I've never understood the reasoning of an adult to "discipline" a child by using physical force ( hitting, slapping, spanking, being pushed down, being picked up by force, etc) to correct a behavior. It's wrong. To me, these behaviors of an adult re-inforce poor behavior in children. As an adult, nobody has the right to use physical force against you but it seems you think it is socially acceptable to do to a child.
And it's not.
Does your boss hit you if you make a mistake at work? Does your spouse hit you if the dishes weren't washed? Does a convenience store worker hit you if you spill something on the floor? Does a friend hit you if you say something they don't like? Does a server hit you if you refuse to tip? If the answer is no, then no, it is not acceptable to physically use force on a child.
One of the many reasons spanking doesn't work is that too much time and effort is spent on the negative behavior you see and not enough time and energy is spend on focusing on the child's good behavior. You've waited until your child acted inappropriately to others when you've ignored that behavior when it's been directed at you.
It's time to change that.
Children at five are now just learning how to communicate effectively, expand their vocabulary and use longer, more complex sentence structure. They will not understand the word "rudeness" but they certainly can understand the concept what they said can hurt someone's feelings. The start of empathy is now and guidance is needed.
Many resources are out there:
https://childmind.org/article/my-5-year-old-doesnt-listen-to-me-and-is-disrespectful-time-outs-dont-work-what-should-i-do/
https://parenting.firstcry.com/articles/behavior-problems-in-5-year-old-causes-and-discipline-strategies/
https://raisingchildren.net.au/school-age/development/development-tracker/5-6-years
https://www.healthychildren.org/English/family-life/family-dynamics/communication-discipline/Pages/Disciplining-Your-Child.aspx
There's a myriad of parenting classes or counseling sessions available to you through your local 211 network. Your child also could benefit from seeing a behaviorist to identify and offer solutions to everyday issues.
Please help your child grow into the wonderful person they will become.