I have bought several single-family homes and also rented several apartments in my long life. When young, I rented because I had no option (no down-payment, no credit history), but after working for a few years post-college I'd been able to eliminate those obstacles and bought my first house as soon as possible. That first house was meant primarily as a comfortable and secure home for my young son (his dad had split), and secondarily as an investment (back then we used to say "they aren't making any more land," forgetting that most of us actually are "renting" from our municipalities, who can boot us off "our" land if we don't pay our taxes). My son grew up in and launched his career from that house, and I stayed there myself for a few years after he'd moved across the country. It turned out to have been a great investment, as the profit I gained when I sold it enabled me to pay cash for a condo in very pricey LA when I pulled up stakes.
I've made multiple upgrades since moving to CA, having been in the position, because of that early home purchase, to ride the real estate bubble of the last 20 years. I've even helped my son purchase a couple of houses. But a few years ago I realized that I had no desire to deal with home maintenance (yard work, broken water heaters, collapsed frnces) and went back to renting. At my age I'm very happy to have someone else handle the grittier aspects of "shelter."
Housing is expensive whether you rent or buy. There are incalculable trade-offs. And one's personal preferences and lifestyle/stage are more critical factors than the financial considerations, IMHO. But assuming one accepts the premise that "they aren't making any more land" and has a manageable investment time-frame (e.g., is young enough to survive some market swings or rich enough not to care), I have to come down on the side of buying for the long-term. Mortgage payments don't typically increase every year, as do rents. Unless you are very unlucky, you almost certainly will regain your initial investment (or profit) if you sell. And for some reason, perhaps irrationally, home-owners are perceived as more stable financially than renters and have some advantages in obtaining additional credit.
Time has marched along, and now my son and I are considering combining households again so that I don't have to live alone and so that my retirement income can be invested in a property that might provide years of additional income for him and his family after I'm gone. So consider your current lifestyle needs and wishes while making some reasonable (but flexible) plans for your future. No one is young forever. Day-to-day, I've never noted a significant difference in living expenses between renting and owning. What matters to me is that I can contribute to my family in perpetuity via real estate. But really, don't go there if you don't want/need the responsibility or the rooted-ness of home ownership -- it can be a real pain.