H and I are living in the 5th home we have purchased.
House #1 - bought when we were very young and had no downpayment (VA Loan), even then interest rate was over 13%. We both worked and no kids yet, but every spare penny seemed to go into the house. Sold it 3 years later when H was reassigned and lost money. If I could have a do over I would not have agreed to be homeowners so young as we missed out on a lot of other things being so “house poor” and it was a bad investment.
House #2 - we only owned for a little over a year (we had hoped to leave the area but it didn’t happen). We broke even after the selling costs.
House #3 - Lived in 11 years. We made a small amount of money when we sold, but when taking into account the capital improvements we made (H terraced the yard to make it usable, built a patio, finished a family room/playroom, full bath and bedroom in the basement) it was mostly break even.
House #4 - Bought 1998, sold 2022. Made a lot of money (sold 3X what we paid). Even given the improvements we made (H built a deck, finished the basement adding another family room, bedroom and full bath) and making updates along the way we still did really well. We got lucky and timed it just right.
House # 5 - living in it now.
My view is that a house CAN be a good financial investment, but not always. That’s what our experience is. But I never really looked at any of my houses that way. To me it is somewhere to live, as is renting. And I don’t think that buying a house is for everyone. Renting is not “throwing money away” as you are getting something for your money. Many people don’t want to bother with the upkeep of owning and I totally get that (and not everyone is as handy as my H).
OTOH - I believe in saving for retirement from the get go.