Investing in the stock market isn't a zero-sum game. If that was true there would never be a bear market and bull markets would be unlikely too. You would only see market increases when new shares were sold. Clearly it isn't a zero sum game. Vast amounts of wealth are created and sometimes destroyed by the stock market. Option contacts are closer to a zero-sum game, but the not stock. Stock value depends on how much profit a company makes.
You could say each transaction is a wash of value, not completely true but it is very close to true. Fees and spread means there is always a slight loss of value unless the all the parties in the transaction are considered.
Ok, maybe I was being too simplistic, but at it's very simple terms, someone has a stock worth X dollars. Why is it worth X dollars? Because someone said so. (sounds like BTC) Then this someone sells it to a sucker for X+/-Y... if it was X+Y, has it gained any value? No. Has the company done anything different? No. None of this matters, it's simply buying and selling "something". The only thing that happens is that money exchanges hands.
No wealth is created except in the illusion that this stock is worth more than X. That is taking advantage of people... and I'm not against it... but it's still a zero sum game. No fiat was "created" in the sale of the stock.