If you get ice dams one winter, you will get them the next one too, unless something changes. That is the frustrating part. People clear the ice, patch the leak, and are genuinely surprised when the same ridge of ice builds up along the same eave twelve months later. Ice dams are not a weather problem, even though they only show up in cold weather. They are a heat problem, and the heat is coming from inside the house. Once you understand that, the whole thing stops being mysterious and the fix becomes obvious, which is good news because the fix is usually cheaper than the repeated repairs. This is what is actually happening above your ceiling, and what genuinely stops the cycle.

What an Ice Dam Actually Is
Snow lands on your roof and sits there. Heat escaping from the house warms the roof deck from underneath, and the snow touching that warm deck melts. The water runs down toward the eave, which hangs past the heated part of the house and stays cold. When it reaches that cold edge, it refreezes. Do that for a few days and you get a ridge of ice along the bottom of the roof. Now the next round of meltwater hits that ridge and has nowhere to go, so it backs up under the shingles. Shingles shed water going downhill. They are not designed to hold back a standing pool, so the water finds its way into the decking and then into the house.
The Real Cause Is in Your Attic
A properly vented attic stays close to outside temperature. Cold attic, cold roof deck, snow that just sits there until it melts off naturally. Ice dams mean your attic is warm, and there are only a few reasons for that. Insulation is thin or has been compressed. Air is leaking up from the living space through recessed lights, bath fans, the attic hatch or gaps around plumbing. Or the ventilation is not moving air, which is usually a soffit problem. Vented soffit is the intake for the whole system, and on a lot of older homes those vents are blocked with insulation, painted over, or were never opened up in the first place. No intake, no airflow, warm attic, ice dam.
Why Raking Snow and Heat Cables Do Not Solve It
Roof rakes and heat cables both treat the symptom. A rake pulls snow off the lower few feet, which helps a little, but you are out there after every storm and you are one slip from a bad afternoon. Heat cables melt a channel through the ice so water has an escape route. They work, in the sense that they usually stop the leak, and they also run up your electric bill all winter and need replacing every few years. Neither one addresses the warm attic that is creating the melt in the first place. If you are doing either of these things annually, you are paying a subscription fee to avoid a repair you could make once.
What Actually Fixes the Cycle
Three things, usually in this order. Air seal the ceiling plane so warm air stops leaking into the attic. Bring insulation up to a proper depth without stuffing it into the soffit bays where it blocks airflow. Then get the ventilation working, which means open, clear soffit intake at the bottom and exhaust at the ridge. On a lot of houses the soffit is the whole problem, and clearing or replacing it changes everything. If the roof is coming off anyway, ice and water shield along the eaves gives you a second line of defense underneath the shingles. That does not stop the dam from forming, but it stops the water from getting into the house when one does.