One line that has failed once, a single pinhole leak in an otherwise sound system, is usually a section repair, not a reason to repipe the whole house.
Multiple failures across different rooms, especially in a home with the original supply lines still in place after several decades, is the pattern that points toward a full repipe being the more sensible long-term answer.
The material matters too. Polybutylene and some early PEX installations have known failure patterns that make a full repipe worth considering even before multiple leaks show up, and that gets discussed honestly if it applies to your home.
Cost is part of the honest comparison as well. Repairing the same section a third time within a couple of years often ends up costing close to what a planned repipe would, without ever actually solving the underlying problem the way a full replacement does.