I would link the consequences to the behaviour, and wouldn’t frame them as punishments. Discipline means to teach - I hate arbitrary displays of parental control. I am a gentle-ish parent. These are all things I said over and over with my son that might help.
“You are clearly picking up seriously unkind behaviour from somewhere - no TV or YouTube today. I know, it sucks - but so does your language today dude and I am tired of listening to you be vile. It’s not how we speak to people. We can try again tomorrow.”
”Ah, you’ve woken up with a truly rotten attitude again today I see. That’s ok. We can all be grumpy when we’re tired but it’s not cool if it makes everyone else miserable. I’m not the enemy. Let’s get to bed half an hour earlier tonight and see if we can do better tomorrow.”
”No, I’m sorry I don’t want to play cars with you. I really don’t like playing with people that are mean to me. Give me half an hour and then we can have a reset.”
Always hold the boundary, always give them a chance to reset and start again with a clean slate.
Some bonus things my kid will say to his therapist/kids because I said them so much when he was little:
”Am I the enemy?” (sullen ‘no’) “Then quit your attitude - we are on the same team.”
”How many times does mummy ask?” (sullen ‘once’) “That’s right - shift your butt.”
”Asked and answered dude - I’m just going to ignore you now. Let me know when you’re ready to talk about something else.” (To stop badgering)
”Do you want to start again?” (Reset question if he’d worked himself into a full on state about anything) “We can carry on like this and have a bad day or start again and have some fun together today. Let me know when you’re ready.”