In my experience, for most regular folks, accumulating wealth through home appreciation is much more reliable than depending on regular folks like us to play the stock market wisely. With the stock market, the professionals tend to benefit from regular folks natural impulse to rush to buy due to greed when stocks are flying and panic and sell low due to fear. The ease of buying and selling stocks is dangerously easy for regular folks. The long, grueling process of real estate tends to safely prevent regular folks from spur of the moment, trigger-happy buying and selling in real estate. Also, tax laws tend to favor accumulation of wealth through real estate vs. stocks. Furthermore, a real estate is a real asset you can live in and the value never goes to zero, whereas stocks don’t provide a roof over your head.
The best technique is probably a combination of both. At least own the place you live in to get off the track of wasting your money paying rent (and the unpredictability of your landlord raising rents or kicking you out so they can sell). After securing your primary home, then whatever you save in the future you can decide whether to invest in another home or just play stocks or do a combination of both.