Here are few tips to get you started. Read the soil conditions report. Before you buy a new house or a lot in a new subdivision, ask to see the soil conditions report. In the mid-80s Colorado passed a consumer protection law requiring one for all new construction. Ask about the type of foundation.
Expansive soils require special foundations.
Instead, pier and beam foundations are the new standard in Colorado. Basically, concrete pillars are set down onto bedrock. Then concrete beams are placed atop the piers. A thick cardboard spacer can be placed under the beams so that if the soil heaves, the spacer will be crushed but the floor won't move. The walls, especially in finished basements, are separated by 2-4 inches from the concrete slab with small spikes for the same reason.