Normally, if the water to a plumbing fixture has been shut off, the entire fixture will not work. The sprayer on a sink is connected to the sink's faucet, which is why you cannot use the spout and sprayer at the same time. If the sprayer works but the spout does not, the cause is not a lack of water at the faucet.
Video of the Day
A diverter piece sits under a cap at the base of the faucet's spout. The diverter, like the one in your bathtub's spout, will change the flow of water so it no longer flows out of the spout and instead goes down the sprayer's hose and out the spray head when you squeeze the trigger. When the diverter wears out, though, the water will not flow to the sprayer, making it an unlikely reason for the sprayer to be working but not the spout.
Modern faucets have an aerator in the spout's opening, which consists of one or more screens that filter debris out of the water. The aerator keeps the debris out of your drinking water, but unfortunately, the aerator may become clogged over time or even from a single event that introduces a large amount of debris into the house's plumbing. If you use the spout and not the sprayer when the debris is present or if you use the spout more often, the spout will clog before the sprayer does.
You must remove the aerator from the end of the sink's spout to clean it out. To avoid damaging the finish on the aerator cap, wrap electrical or duct tape around the jaws of a pair of pliers, then use them to twist the aerator cap counterclockwise. Take the aerator apart, lining up the pieces so you can reassemble it easily. Wash the different parts under a strong stream of water. If the aerator has caked-on hard water deposits, you will need to soak the parts in vinegar overnight.
Source of Sediment
Sediment comes into the plumbing in your home from a few different sources. Your municipality may have hard water, which will cause deposits to build up in the aerator. These hard water deposits can accumulate on pipes and then break off, traveling down the pipes. Turning the water on in the home, after shutting it off, can create enough force to break off small pipe shavings or solder joints, which will clog the aerator. If the city has been working on water lines in your area, sediment will be introduced into the plumbing.