The fundamental problem is that building quality housing is a society-level project - you don't just need to build a house/apt but supporting infrastructure, such as water, power, waste, public transport, supermarkets, and figure out how to connect it to the city's infrastructure.
There used to be political will to do this. Nowadays what I see around me, is that developers keep plopping down housing projects either in the middle of nowhere or in some highly undesirable area (like next to the train tracks, or some old industrial development) and sell the resulting apartments at crazy pricess. Zero infrastructure of course.
No it isn't. We deliberately hobble home construction with zoning and permitting rules, which aren't based in any infrastructure carrying capacity concerns (in fact, dense housing has advantages for infrastructure and energy uses --- few things are as inefficient as a single-family home).
Fixing exclusionary zoning rules isn't a society-scale project.
There still is political will to do this, it happens all the time around the USA. Do you think all these neighborhoods with hundreds of new houses get built without water, power, waste, and supermarkets? See DR Horton/Lennar/Toll Brothers/etc websites, and they will all be connected to utilities and have retail mixed in or somewhere near.