In the majority of markets an individual that invested the down payment into the SPY500 as opposed to a house comes out a head. Especially if you sell the house on average every 7 years ...
Just do the math yourself; it's pretty easy [1] [2] [3] [4].
That said, not every decision in life needs to be profit maximization. You can enjoy owning a house.
[1]: https://research-tools.pwlcapital.com/research/rent-vs-buy
[2]: https://www.nerdwallet.com/calculator/rent-vs-buy-calculator