We replace both cables as a pair even when only one has failed. Cables age together on a door, and a fresh cable paired with a worn one just means we're back for the second failure within a season, particularly with the cold-severe winters this area gets, which stiffen and embrittle aging cable faster than a mild climate would.
We match the gauge and length to the door and spring system already installed rather than swap in a generic size, since a cable that's slightly wrong for the drum or pulley diameter will re-fray at the same spot inside a year. Once the new cables are on, the door gets rebalanced and the track alignment gets checked, since a door that's run crooked for a while, even a few weeks, can knock a roller or a bracket loose enough that it needs attention too.