It's the ground they sit on. The land value of my house is 1.4M. The house itself, a near derelict built 100+ years ago is worth 90k.
While construction costs have increased, the actual building product is not the real problem here.
What flows from this though is the clear solution:
Subdivide the valuable land.
Take something worth 1.4M and divide it by more than 1.
Create a small apartment of several units on my land and you can generate a product that is cheaper than $1.5M.
So the core problem right now is that subdividing land and building apartments is largely banned in many places. Accordingly people are only able to buy very expensive plots of land.
(Now yes obviously if you subdivide land the value of the underlying land increases as one can generate more revenue from it, so there's some friction to price drops here, but much has been written about how ultimately this does result in a greater amount of cheaper end product in the grand scheme of things)