Yes, most of the wealth of the ultra-wealthy comes from the growth of share prices. But that growth didn't just materialize out of thin air.
It comes from other wealthy people and institutions (primarily the large banks) gambling on how successful the corporations the ultra-wealth own and run are going to be at generating profits.
Profits are the difference in the cost to produce goods and services and the revenues generated in selling them.
The production costs are a combination of the machines necessary to produce them and the labor necessary to run those machines - in a physical factory setting. In a knowledge setting, it is almost entirely the labor of the knowledge workers.
Notice how most of the billionaires come from the knowledge economy?
That wealth is literally generated by wealthy people and institutions judging that the ultra-wealthy will be ultra-successful at squeezing profits out of the people who did the work of creating their companies products by paying them less to create those products than they can generate by selling said products. And by squeezing money out of the rest of us by charging us more to use said products than it cost to create them.
It is literally generated by taking money from everyone else involved. That's what "profit" is and it's profit, or the expectation of future profit, that generates the wealth.