If the costs of renting, inclusive of any possible foregone appreciation gains from real estate, are lower than of buying, then the economically rational choice is to rent, not buy.
In urban economics, the value of housing is largely dictated by the potential income one can acquire by virtue of holding it. That is: housing reflects the local prevailing wage.
It makes zero sense to rent a property (as a wage earner) for more than one can make in income living in the area. Hence, rents tend to be much more responsive to wage inflation/deflation than housing prices (student and retirement housing would be exceptions, but they're constrained by similar functions ultimately).
With real estate, there is the potential for appreciation gains. This presumes, however, that there's someone willing to buy at the appreciated property later. Housing prices cannot inflate indefinitely over other assets. And the long-term historical return on housing (since the 1880s or so in the US -- period for which data are available) are in fact lower than most forms of investment. Housing carries heavy costs: taxes, maintenance, improvements, etc. And it's largely an illiquid asset, particularly for the small investor (I may have many of a smaller investment to sell, I generally only transact in a single house at a time).
There are other tweaks on this: rental/owner-occupied housing aren't perfectly substitutable (covenants, HOA restrictions, etc.), there are non-financial returns to housing (or at least longer-term returns), notably school district access and crime/safety rates. In markets with low vacancy rates, rental values may fluctuate more broadly. Bank lending practices may make buying easier (2000s) or harder (2010s) at any given time.
But the upshot is still: rental prices in a given market tend to be a better guide to local economic conditions than real estate prices.