Until the 30 year mortgage is paid, the bank owns your home. For those fortunate to have bought before prices soared (2003) and sold before the market went down (2006), they were extremely lucky.
Closing costs and commissions are a substantial up front expense, so if your career path is causing you to move every few years, it is probably better to rent.
In order to maintain or increase the value of a house, good maintenance and updates are important. Advantages to owning vs. renting - you can have pets, smoke and have any type of fences & landscaping you want. Just stay away from developments with HOA’s especially condos - where there are rules and regs similar to landlord domination.
I rent and have a dog in a reasonably quiet neighborhood. Maintenance, community pool, clubhouse, air filters and repairs are included in the rent, as is water, sewage & trash, all for less than $800month for a 3/1. I pay my younger next door neighbor $10 to mow when needed.