Garage door cables ought to be replaced when broken. This task is of high risk and needs great attention for two reasons. Cables are parts of the spring system and they actually help lifting the door as they wrap around the drum or go through pulleys. They have high tension and their replacement needs attention. If the new ones are not installed properly, the door won't open properly and your safety will be compromised. Also, when one cable is being replaced, there is a big chance to have the other one come off the drum and so you will keep repairing them.
The broken cable must be removed carefully. It must be detached from the torsion spring shaft and removed from the drum or the extension spring pulley. It needs attention when the new one is installed. The end part with the loop must be attached at the bottom door part. If the cable is shorter or longer, the door must be level. Broken garage door cable replacement must always take place with the door open, the opener disconnected and the door c-clamped.