Depending on your temperament it could go either way. What I have found is that there are a lot of people who can't handle being in actual stocks because things move too fast for them, or the numbers tend to make their eyes glaze or any number of other things.
Others have problems with direct ownership of real estate because of such issues as the amount of labor involved in the upkeep. Or the extra laws that apply to being a landlord. Or just the need to coordinate with so many other people.
Either way, work is required if you are going to do it right. And there are details that need to be tracked. I'm currently in the position of needing to do both.
Thanks to the current real estate situation, I was able to buy a new place to live in. However the very circumstances that made it possible, currently preclude selling the old place at this time. Resulting in my becoming an involuntary landlord. Result, personnel issues are now a periodic issue.
I'm am in fact in the position of running a small business with myself as the sole shareholder and employee. There are people who enjoy or at least get a thrill in doing that kind of thing. Do it right, and the potential for profits will be greater than financial investments are likely to be. Without such people, there would be no businesses, and possibly no stock market. But not everyone is suited to being that directly involved.
Most of us tend to prefer participating in the background somewhere. And that is where investments enter the picture. But even then, temperament is an issue. As I said above, for many people, stocks move too fast, and ownership makes them lose sleep at night. Nor are they willing to do the basic amount of work necessary to ensure success at it. For those people, Mutual Funds tend to be a better option. At least that way, they got someone managing the money for more income. And hopefully the fund is producing more than a bank would.
Personally, I prefer to invest directly myself. But that is because, historically, I have typically outperformed the average fund. Not hard to do, if you are willing to do the necessary work involved. Still, what makes sense depends on who is asking the question. We are not all the same. Consequently the correct answer isn't necessarily the same for everyone.
Real estate is an expense and should be consider only for shelter.
Real estate is illiquid had high frictional costs to get in and out. Its only better for the industries that service real estate like agents and contractors.
There are now ETFs and Funds that track the price of real estate and can offer the same leverages that real estate offers without some of the headaches. Theres a new 3x ETF on real estate that mimics buying real estate as if you bought with a 33% down payment.
it would be even wiser to open up this topic beyond just stocks and real estate... like options... commodities, bonds etc.