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.
No, you don't get it. By buying or selling, the price has changed. The value of a company is the market cap that is simply (price * shares that exist). In fact it is often impossible to do a transaction without changing the price. The price changes for every share in existence. It doesn't matter if you think it is an illusion, that is all the money really is. However, everyone that holds shares of the stock traded see a new value. It isn't a zero sum game.
Simple example. I left my old company with about 1000 shares of stock in a 401k, it was worth less than $20,000 USD. Every quarter that stock pays dividends and they used to be in the 10's of dollars, now they are in the hundreds of dollars. Those dividends are reinvested in the stock providing more shares. Now I have a bunch more shares and last week the market value of my shares was $68,000. I could sell those, collect my $68,000 and that transaction would barely reduce the value of everyone else shares only for a few seconds and there is a lot of demand for the stock. So where did the $48,000 USD come from if it is a zero sum game? You can't explain that with your logic. That money has simply just been created by the stock market. Money isn't created/destroyed by printing paper, it is created/destroyed by markets and things like fractional reserve lending. (I.E. Banks create money by lending out money they don't have and people destroy some of that money by paying of debt.)
There is a very simple concept here that many don't get and it is the reason why we need something like bitcoin. Fiat currency is just numbers, the money in your bank account is just numbers and the money in your paychecks is just numbers. It only has value because we believe a government that it has value. Stock markets change the numbers and the governments of the world back up those numbers and say they have value.
There are zero sum games, stocks markets aren't one of them.