There are two ways to make money in stocks:
Here is a great chart from S&P Dow Jones that shows the level of dividends for all the stocks in the S&P 500. You’ll notice a steady increase every year (except for a minor reduction during COVID) going all the way back to 2012, and so far this year, we are on track for another record.
Quite simply, over time, this increase in dividends is why the prices of stocks go up.