Over time, older buildings become cheaper until they’re either renovated or razed and replaced with new construction. But it’s a cyclic process: new construction is expensive, and gets less expensive relative to other newer units over time until it is renewed.
Now, there’s still a ton of unmet demand from people moving into cities: this pushes all prices in the market up. And unfortunately, (covid era excluded) there’s just so, so, so much demand from people moving to SF/NYC/LA/Seattle/etc that even if we removed all zoning restrictions and started building at a furious pace, cities probably wouldn’t be able to meet demand across the economic spectrum for another few decades. Covid may affect this in some way in the short term, and other trends may affect this in the mid-long term (we did have suburban exodus once before in US history).
One way to address this problem is to massively fund public transit infrastructure projects inside the city and in surrounding metro areas. Tokyo has ~30 million residents is relatively expensive for Japan, but living even a 20-30min subway/train ride from the city center is actually surprisingly affordable compared to other international cities. Seoul is similar. Chinese cities have similar infrastructure systems, but I can’t speak to how that affects affordability because there are other economic/political factors at play. But that seems tragically unlikely to happen in the US.