You almost always get warning. Foundation movement is gradual, showing cracks, sticking doors, and a slowly bowing wall over months to years before anything approaches failure. Sudden collapse is rare and usually follows long-ignored signs or a catastrophic event. Catching the early signs is exactly why monitoring and inspections matter.
More detail
The reassuring reality is that foundation problems give warning, often a lot of it, before they become serious, because the underlying processes are gradual. Settlement happens as soil slowly consolidates or shrinks; a wall bows incrementally as seasonal soil pressure ratchets it inward a little at a time; hillside creep moves over years. Along the way the structure produces visible signals well in advance: cracks that appear and slowly widen, doors and windows that begin to stick, a basement wall that develops a horizontal crack and starts to belly in, floors that gradually slope, gaps that open between walls and ceilings. Months to years typically pass between the first signs and any condition that would be considered dangerous. Genuine sudden failure, a wall actually collapsing inward, is rare, and when it does happen it almost always follows a long history of ignored warning signs (a wall that bowed several inches over years and was never addressed) or an extraordinary triggering event like a major flood, a saturated hillside after extreme rain, or excavation right against the foundation. That is precisely why the early warning signs are worth acting on and why monitoring and free inspections are valuable: catching a wall at a slight bow or a foundation at early settlement means a modest, lower-cost stabilization, while ignoring those same signs until the movement is severe means a far more expensive and disruptive repair, and in the worst case, a real safety concern. For a questionable but not-yet-urgent crack, marking and dating it or installing a monitor gauge and watching for a few weeks tells you whether it is active. For clear structural signs, an inspection establishes how serious it is and how fast it is moving. The system is designed to give you time; the mistake is not using it.