There is a crazy amount of land in the world, but either it's too expensive or you're not allowed to build over it, or a combination of both. Houses have been built for millennia but somehow in the most advanced period of humanity you're supposed to pay hundreds of thousands of dollars for a roof over your head.
I think that low key the ruling class + landlords are not interested that housing be an affordable thing, so the whole system works to create artificial scarcity. How's the population going to be forced to work unpleasant and low paid jobs if not by controlling their access to housing? You have to be too naive if you think that a few minds in your country's parliament haven't thought of this.
If someday economic activity gets automated enough, and the majority of people are not needed anymore for regular jobs, and this populace gets violent with their ruling class, then I think a lot of housing will be built outside of cities, and the supply of houses will no longer be a problem.