Now the prices have skyrocketed due to offer and demand, and frankly because of the narrative that "Buying is always good", which ironically makes it a subpar investment.
Real estate is now a subpar investment. Especially today, and even with those advantages. It is also not diversified at all, absolutely not liquid and does not return even close to the SP500 (Even if you take the leverage into account, and leverages go both ways by the way...).
Too many people are too quick to dismiss renting because of the “conventional wisdom” - or think that only small apartments can be rented.
On the other hand, owning comes with comforts that can be hard to put dollar amounts on, for some.
I know there are people out there that like maximize returns with leverage and all of that - and the math all makes sense! - but I'd prefer the simplicity of not dealing with it.
Then of course you have all the expenses of home ownership, starting with real estate taxes ($20K/yr by me), maintenance (incl. costly items such as roof replacement), etc.
Deliberately investing in real estate, where you can choose the city/market, type of dwelling, need for renovation, etc, may have a higher chance of being profitable, although even there obviously buying at bottom vs top of the market makes a big difference. For people just buying a house to live in, conventional wisdom is not to expect it to be financially preferable (all told) than renting, even if sometimes - depending on timing - it may turn out to be.