In the stock market, the money you invest into a company is used to pay for workers, equipment, etc that generates more dividends. Anything you invest in staking is competing in a zero-sum with other stakers.
Only if you invest in the IPO or later stock offerings directly from a company. Otherwise you're just buying in the secondary market and no part of the price you pay goes to the company.