The article is basically correct. Let's explore the options.
BUYING REAL ESTATE
------------------
Take the average price of a home in the USA, according to a google's top result, approximately 200,000.
Take the average APR at the moment, 4.5%.
That results in a $800 payment per month for 30 years if you put 20% downpayment of 40,000.
(source https://www.dollartimes.com/loans/mortgage-rate.php?length=3...)
Depending on the area, you'll most likely be able to rent a similar home for the same or lower amount.
BUYING STOCKS
-------------
Take the same 40,000 downpayment and invest them in a low cost broad market index fund such as Vanguard, SPDR, etc.
Assuming an average long term return of around 9% for the stocks, after 30 years this will result in around $600,000.
(source https://www.investor.gov/additional-resources/free-financial...)
WHERE IT GETS INTERESTING
-------------------------
Let's look at what happens after only 5 more years. Your investment has now grown to over %933,000! If you wait 5 more years (40 years total), the sum is now $1,400,000+ !
Why? Because investments in stocks are compounded! I believe one of the reasons why people think a house is an OK investment is because they don't realize the biggest flaw of one house - it does not really compound the way liquid stocks or ETFs do. In the short run it's hard to see the difference but given a long horizon the differences become enormous.
There's reasons to own a home such a sentimental value, ability to modify it just you like it, etc. But people who believe it has been or is a great investment in the long term are deluding themselves. Look at it as something that's nice to have, or luxury if you will.
PARTING THOUGHTS
-------------------------
You can always come with an example where real estate was a great investment. You can make that argument both ways. If you bought real estate in 2009, you made great returns but if you do the above calculation for the average broad market ETF chances are the returns are even better!
In the long term, history is on the side of dynamic stocks/companies and not real estate. I don't have a crystal ball and can't promise you that choosing one or the other will be better next month/year/decade etc(aka past results do not guarantee future returns). After all, this is all facts of the past :).