If an old galvanized pipe comes out from the wall, installing a shutoff valve is usually a straightforward job; simply screw a threaded stop valve onto the pipe.
If possible unscrew the supply tube at the bottom only, so it remains attached to the faucet or toilet above. If this is not possible, you may have to cut through the supply tube with a hacksaw and replace the tube after installing the valve.
Unscrew the parts up to the nipple that sticks out of the wall. Look into the pipe with a flashlight. If it is partially filled with mineral deposits, replacing it will increase the faucet's (or toilet's) water pressure.
Some water will remain in the pipes and tubes after water has stopped flowing out the faucet, so you might want to place a bucket or a thick towel underneath.
One or two hours
Two pipe wrenches, adjustable wrench, possibly a hacksaw
Cutting and joining steel pipe
Shut off the water; drain the line; place a bucket or towel below the pipe to be cut to catch debris
New threaded stop valve for your size of pipe, pipe-thread tape, possibly a pipe nipple
Shut off the water and drain the line by turning on a faucet at a lower location. Hold the steel pipe still with one pipe wrench while you remove the elbow with another wrench. If you can't budge the elbow, slip a length of 1-1/4-inch steel pipe on the wrench handle for more leverage.