As mentioned earlier, "it depends." It depends on the local market, your goals, your skills, whether you have a family, what you want to spend your free time doing, how far ahead you plan your future, etc. There are situations when it is a good idea to rent, and situations where it is foolhardy at best. However, all things being equal (and I say again, they rarely are), owning is the better option
When you rent, your monthly payments build no equity and rise often. The portion of your monthly payment that doesn't go to taxes, upkeep, and other expenses end up as profit in the landlord's bank account.
When you own, your mortgage payments build equity. (Especially if you pay down extra on the principle.) That is, you essentially "own" a percentage of your house. Depending on short-term market fluctuations, you will get it back when it comes time to sell. Or, once the mortgage is paid off, you own the value of the whole thing. For this reason, many people consider their equity to be a part of their 'stache, especially if their FIRE plans include selling their house and travelling or downsizing to a low cost of living area.