How do you stop 🛑 kids from hitting you?

What are good coping skills for children? When he doesn't get his way he gets angry and will punch so I'm scared like if I don't do something he's going to hit me and it's not right I'm the parent and he shouldn't be hitting ages 6-7