It really depends on where you are moving to, and the potential for RE to rise in that place.
In my case, I chose a LCOL place that had high potential to increase. I bought a place for around $300k 15 years ago, and it's now increased to around $450k. I've put in $12k in AC, $9k in improvements plus the usual landscaping etc. So aside from mortgage interest, my investment has been $321k. If I were to sell right now, I would have a capital gain of $129k.
My monthly payments were around $1k, total cash flow into living was around $240k ($180k monthly cash plus $60k down payment), with equity in my house about $150k, I should get back around $279k (minus commissions), or roughly 20k back in cash net (after subtracting maintenance / repair, etc), not taking into account time value of money.
I have a friend who has been renting this entire time. Initially rent was around $700, steadily rising to around $1.1k, and will go up to $1.3k this year. Averaging rent out to $900, for 15 years, his out of pocket is $162k, for a much smaller place than mine, with only a carport (where someone stole his vehicle last year since it was out in the open).
So to compare side by side, my total cash out of pocket is around $20k positive, whereas my friend is $162k negative with no asset to show for all that spend, it's pretty clear home ownership is the way to go in my area.
To top it off, I refinanced to a very low rate in 2012, and took about another $80k of equity out of my house and put it to work in the stock market. That money has roughly doubled, earning me a further $80k in capital gains.
So to sum it up, in most places where real estate is expected to match inflation or go up even more, you're probably better off being home owner. Only in really destitute places or special circumstances does it make sense to rent long term. Renting is paying someone else's mortgage and cost of repairs, maintenance, taxes, etc., with the only benefit being you can leave the property more easily than a homeowner. There's really no getting around the match.
One other thing to mention is my friend is facing annual rent increases of 5-10% as this area is going up in popularity with more people moving in. My mortgage is fixed and cannot go up (plus the value of my house keeps going up as well due to lack of supply). The monthly cost of $1k is permanently fixed whereas my friend is looking at monthly rent increases with each renewal of rent. If more people were like my friend, I'd be a huge landlord and have tenants pay my mortgage for me.
This is why the majority of millionaires have made their money via real estate. It's easy to leverage capital for slow growth with no special skills or talent or family connection needed. Anyone can become rich via real estate, it's the most equal opportunity in pretty much all of America, compared to other industries / businesses.
Home ownership far outweighs renting in most cases, in my analysis.