In theory, if I put $N into an equity, then someone else will get $N out, because efficient market and all that. That frees the same $N up for that other person to consume/invest.
In practice there is somewhat the detail of equities being bid up a bit by people wanting to own them.
If I buy stock post-IPO, that provides cash to someone else to either invest in additional stock or spend on consumables.
I don't agree that investing in any way relates to hoarding.
> the money used to buy a share has to go to the seller of the said share, who might in turn use it to consume
It's really simple:
1. When you spend your money on consumption, there is a guarantee that the money is used for real world economic activity.
2. When you spend your money on building your business (the restaurant example in my comment), there is a guarantee that the money is used for real world economic activity.
3. When you put your money into an index fund, there is no guarantee that the money is used for real world economic activity.
It might be used in this way via indirect channels, but there is no guarantee - after all, the money might just remain stationary in a bank account, of which there are many - and so the positive economic effect is most likely less than in the first two cases. (Again, the positive effect for me as an individual who saves is obvious; I'm talking about the effect on economic activity.)
See, "investment" is such a loaded term. Somebody who uses their savings to open a restaurant is clearly making an "investment", and this form of investment is directly positive for the economy.
When you put your money into e.g. an index fund, the situation is much less clear. You help drive up stock prices, but this does not immediately say anything about the real world. At the same time, the counterfactual is that you would have spent this money on consumption, or to buy a new car, or whatever.
Those latter actions directly increase the demand that companies see, which encourages those companies to expand, i.e. to increase real world economic activity.
Don't get me wrong: individual saving is a wonderful thing, and there are all sorts of good reasons for it. But if nobody consumes, the economy has no reason to grow...