If your house went up between the late 1970s and the mid 1990s, there is a fair chance the supply lines are polybutylene. Grey or blue plastic, usually with crimped fittings. It was installed by the mile up and down this shore and it fails from the inside, which is why a house can look fine right until it doesn’t.
The older cottages on the town grid have galvanized steel instead. That rusts inward over decades, so the pressure drops everywhere at once and the hot side goes first. If your shower has slowed over ten years and you stopped noticing, that is usually why.
And copper, which should outlast all of it, pinholes early on acidic well water. Low pH eats it from the inside and puts a hole through a wall or a ceiling with no warning at all. That one is not about the age of the pipe. It is about the water, which is why we test the well before we quote a repipe on one.
The fix is the same shape in all three cases and the reason for it is not, so the first thing we do is work out which one you have.