Fix the reason, not only the result
Why A Garage Door Cable Comes Off The Drum
A cable that leaves the drum usually became slack or tracked incorrectly. The useful question is what allowed that change to happen.
A door may strike an object, a roller may bind, a spring may fail, the shaft or drum may shift, or the door may be incorrectly balanced. Cable length, routing and drum compatibility also matter. If the door was lifted while crooked or obstructed, one side can lose tension before the other.
The cable and drum are inspected along with the spring system, tracks, rollers, bearings and bottom fixtures. A cable that remains undamaged may sometimes be reset, but worn or deformed cable is replaced with the correct size and construction.