Or, the only places to build houses with reasonable costs are in areas that weren’t already built out with very expensive houses.
Which will tend to be less desirable areas, by definition.
One approach, of course, would be to also make existing houses less expensive/desirable. Notably, wealthy people tend to have the resources to fight efforts to do that.
The other approach is to expand what land is available to build on. I understand that in the UK, farmers consider it a lottery win if they get planning permission for some of their farmland to become housing.
Despite what many in the UK think about it "being full", this is mostly an illusion from how cramped are the parts in which the houses are allowed to go; the country as a whole is mostly undeveloped.
(There are of course other considerations, with "why did you build on a flood plain?" being one of the failure modes in the UK).