The first thing to do is to pray, as you have been doing. Resolve that change begins now, and ask God to grant you the grace to carry through on your resolve. Make a good Confession and you’re good to go to the next step.
The next step is of course to sit your son down at a quiet time and take responsibility for what you did that crossed the line. For example, as a parent, you do have the right and duty to correct him, but you make mistakes by doing it 1) in a loud voice instead of a calm, firm tone, and 2) a public setting, especially if his friends are nearby.
Give him time to take in what you’ve said, and don’t make excuses for your past behavior, but do express the concept that wouldn’t it be less frustrating for both parties if we improved our communication. Because you love him and hopefully he loves you back, even if he’s a guy and that might feel mushy to admit.

Tell him you’d like to come up with something like a code between the two of you that you use if he does something he shouldn’t. It could be a glance, a hand signal, whatever.
If he has an idea what would work best for him, if it’s reasonable, that’d be great, because that way if you give the signal and he doesn’t obey, you can point this out (not in a nagging way, but just that the two of you agreed on it and you’d like to recommit to making it work).
Hopefully there will be a peaceful and positive agreement, or at least acceptance. From then on it’s just day to day, and if you make a mistake, apologize, recommit to the new plan, lather, rinse, repeat till the drama times become fewer and farther between. God bless! :console: