If a company is able to make profit from their business, then ownership of that company is valuable, regardless of whether they return that profit to you in the form of dividends or not.
Shares have no durable inherent value outside the expectation of profit. Without a dividend, or some tax-efficient simile to them, the expected value of a share you don't sell is exactly zero.
If all the expected value of a share comes from selling for every actor, then selling and buying that share is a zero-sum game by definition.
The argument is that all companies go out-of-business at some point, eventually. With no way to extract money (e.g. dividends), their long-term value is 0. In the meantime, buying and selling is a zero-sum-game.
This argument is incorrect for two reasons:
1) Dividends are one way to extract value. Another is mergers, acquisitions, and spin-offs. For example, if Musk had bought Twitter with no dividends, shareholders would make money. If Google were split into 50 mini-companies, and Microsoft acquired one of those, shareholders would make money. There are many other ways to extract value
2) Like dollars, shares act as a fiat currency of sorts. We can all keep our saving there if we all keep believing.
If a company isn't in the profit-making business, that's a place for shareholder activism, though. That can be a pool of small investors, or they can be bought by a Berkshire-Hathaway, who can reorganize them for profitability, and resell them.