To be fair, both can apply, it all depends on where you buy, when you buy and the rate you borrow at. Ideally, the obvious aim is to buy before prices rocket, and ideally do that by borrowing at a very low rate, but this does not happen often, but then you also have the problem that you've not really gained, as the house you would want to move to has gone up also.
I've read a lot that the way a lot of people do it is wrong, because they've been taught by people who don't know a thing themselves, and only do things as that's the way everyone does it.
Effectively some younger (and more likely single/ childless) people would be better off renting and moving around from job to job, place to place and climbing the income ladder faster, whilst investing a potential deposit (and savings) in something relatively high short-term risk (but low risk/ high gain long term). The gains in the investment and income can make equity gains in houses look like pennies, and more than cover rent, so much so that someone could buy a bigger house outright in 20 years and have the same money again left over.
I wish I'd just invested and rented, rather than getting on the ladder in Teesside 14 year ago or whatever, I'd have been much better off.
Doesn't seem like a great time to get on the ladder now, with rates going up, and house prices coming down, whereas the markets are in a hole and will probably get some hefty increases over the next 5 years or whatever.