The short answer
Most foundation repairs cost a few thousand dollars, not tens of thousands. Sealing one crack is a small job. Bracing a wall or putting a drain around the whole basement is a bigger one. A full rebuild is rare and costs the most.
The price table on this page shows typical ranges from national cost guides, including Fixr, Angi, Acculevel and HomeAdvisor. These are typical ranges, not a quote. Your real price comes in writing after the free inspection.