Other than the IPO, when you buy stock you aren’t providing capital for companies to use though, right? and most companies do not pay dividends at all.
This is a common misconception. Companies often raise capital by selling more stock, and by buying stock you increase the amount they are able to charge.