>>51925293as first resort, ignore it when it's wailing. eventually it'll get bored.
if that doesn't work, water spray or timeout box. note that cats aren't smart enough to understand after-the-fact punishment, so it has to be done when they're being shits.
maybe physically carry them and put them somewhere else.
you might also need to reestablish yourself as the boss of the house. this kinda behavioral training is more common with dogs but also applies to cats.
the key point is that cats are animals, not people. they don't understand your words. they don't understand your reasoning. they don't care if you're angry if it benefits them. they don't differentiate between yelling because you got spooked in minecraft and yelling because you're pissed at them. they're pets, not family.