Plenty of roofs that get replaced could have been repaired, and plenty that get patched should have been replaced two winters earlier. The difference is usually visible if you know where to look.
Granule loss is the first sign. Composition shingles shed their mineral surface as they age, and once the mat underneath is exposed, the shingle has no UV protection left. A gutter full of granules after every storm is a roof telling you its remaining life is short.
Second, look at the shape of the shingles rather than their color. Curled edges, cupping and cracking mean the asphalt has dried out and lost flexibility. Individual damaged shingles can be swapped; a whole field of curled ones cannot.
Third, check whether repairs are repeating. One leak fixed once is a repair. The same area leaking again after a patch usually means the underlying flashing detail is wrong, and no amount of sealant on top of a bad flashing will hold through a wet season.
Fourth, walk the attic with a flashlight on a bright day. Daylight through the deck, stains along the rafters, or sheathing that feels soft under pressure means water has already been getting in. Soft sheathing has to be replaced regardless of what happens on top of it.
Fifth, consider the age against the material. A composition roof approaching the end of its rated life is worth replacing while you can schedule it, rather than in January when it has made the decision for you. If you are unsure, ask for an inspection that includes the attic, and ask the inspector to show you photographs of what they found rather than just a number.
