Shut off the water at the main shutoff valve ... you might use a push-fit valve to replace your old compression or sweat valve. Most push-fit valves require at least one inch of stub-out tubing.
Fix a plumbing leak and get your toilet back into service ASAP by DIY-ing a toilet shut-off valve replacement.
That inconspicuous toilet shut-off valve doesn’t see much action ... Reinstall, making sure to tighten all compression nuts, and recheck the fitting. Replacing a leaky toilet valve is a repair ...