My Reaction To My Kids Words

My boys are 6 and 8 years old and they have been saying so many words lately that I “think” they shouldn’t say.

I tell them to not say the words, and I’ve been sending them to their room when it happens, but it is still happening. Specifically, yesterday I had really had enough. Here’s my model

C- Son says word “stupid”
T – I have told him not to say that word and he isn’t listening to me!
F – Disrespected
A – I yell, and tell him if it happens again he will spend the whole weekend in his bedroom, I ruminate and spin in my head about how the kids keep saying the “words”; I get down on myself for how I responded; I tell myself that I have to have more control and patience with my emotions.
R – I’m not listening to what I need in the moment ?

Can you please help me with this model? Thank you!