Ah, the classic nightmare. You find the valve. You grab it. It doesn’t move at all. Not a millimeter. It’s like it’s been welded there by the ghost of a stubborn plumber.
Don’t use a wrench. Don’t use pliers. If you force it, you might snap the pipe. Then you have a real flood. A gusher.
Instead, reach behind the toilet. Feel for the big rubber hose that goes from the tank to the fill valve. Pull that hose off. That will stop the water from overflowing. Yes, it will splash a little. You’re a survivor.
Or, go to your main water shut-off for the whole house. That’s the nuclear option. Find it near your water meter or outside. Turn that big wheel clockwise. Problem solved.