With a house you get a place to live at a big discount from the rent. Plus you can fix it up as you wish. When you leave or sell the increased value from your improvements goes to you, not to the landlord.
Charges and taxes (when you put up 80% cash on a home purchase) are normally less than you’d pay for a comparable rental without ownership. You get tax benefits for taxes you pay on the house, and for the mortgage interest.
If you looked around and bought your house under market price as a distress sale you have an immediate profit built in.
If with 20% down, your property goes up in value 20%, you have made 100% on your investment. If the real estate market drops, it doesn’t matter, you still can live in the place with the overhead being what you expected. Eventually you will make money.
If you buy a diversified portfolio of stocks and bonds from a mutual fund or hedge fund you could and probably would lose anywhere from 50% to 100% of your investment.
Nothing is without risk. The main problem with property is not the risk, but rather looking after it and repairing things. Property ownership and especially dealing with tenants is stressful.