The slowdown in the otherwise red-hot housing boom has been stunningly swift.

The U.S. housing market surged during the pandemic as homebound people sought new places to live, boosted by record-low interest rates.