After doing some research it seems it can be more involved than replacing the valve on a copper pipe.
Replace toilet shut off valve pvc pipe.
Place a bucket under the old valve.
Close the new valve.
Open the faucet to drain the line.
Turn off the next valve up the line which may be the main water supply valve.
Learn how easy it is.
If the valve is in the house put a bucket under the pipe to catch the water that spills out as you cut.
Turn off the main water valve to the house.
Leah from see jane drill demonstrates how to remove an old water shut off valve for a toilet and install a new one compression type.
Thread the larger end of a toilet shutoff valve on the threaded end of a 1 2 inch pvc socket to male thread adapter.
Turn the water heater gas valve back to on or flip on the circuit breakers to the electric water heater.
In my case the valve is connected all in one to the hose that needed replacement.
Deburr the pipe with a deburring tool.
Drain the water lines.
Cut the supply line with a pipe cutter leaving enough room between the escutcheon plate and the cut to allow installation of the valve fitting.
Cut through the pipe about 2 inches from one end of the shut off valve with a handsaw.
Then shut off the upper and lower faucets.
For valves at pool or hot tub pipes open the pressure release.
Before you remove the toilet shut off valve you ll need to drain the supply line to prevent the water remaining in the pipe from gushing out onto your bathroom floor.
How to replace a shut off valve under sink of stuck to the pvc pipe.
2 hold the assemble adapter and valve against the pvc pipe extending from the wall.
Need to replace toilet water shut off valve on cpvc pipe i need to replace the above shut off valve for my toilet to possibly fix violet rattling when i turn on the water.
Then open the water main shutoff valve and let the water run until all the air is out of the pipes.
Open a spigot and allow water to drain out of the pipes and turn off the spigot.