Apple issues stock at $200/share. Bob buys one share. Apple is now $200 richer, Bob is $200 poorer.
Later, Apple goes up to $300/share. Bob sells his stock to Charlie. Bob is now $100 richer, Charlie is $300 poorer. Total change: zero.
Apple is more valuable and that (probably) means wealth was created, but that increase in wealth comes from Apple doing things, not from the trading.
Non-stock trading creates wealth because different people value things differently. A sandwich is worth less to Subway than it is to me, so total wealth increases when I pay them for a sandwich. But stocks don't really work that way. Unless you're buying a stock to exert control over the company, the only thing you're doing with it is using it to make money money. If you're making money by selling at a higher price later, then that comes from someone else paying that higher price, and it's all zero-sum.
I was responding to "Pension funds, banks, HFT firms can all make money while trading with each other." I readily accept that economic activity is not zero-sum, creates wealth, and that trading stocks can help enable that. But just trading by itself doesn't make money.