"As for the stock market, it’s just like gambling."

I hear that a lot. It is somewhat gambling if one is a speculator. Less so if one is an investor, especially if one invests in index funds/ETFs. I say that because gambling is an all or nothing game. Most stock market gamblers may lose "some" of their money, but it's unusual to lose it "all" in the short term - unless one is seriously reckless and didn't conduct "any" due diligence.