Sure you can invest in companies that make nothing, have no actual value, and pay no dividends... In which case you'd be investing in something a lot more like crypto.
Or you could, you know, not invest in crappy companies nor speculative assets and spend more than five minutes "researching" a thing before sinking significant money into it. Most reputable companies pay dividends and you can even look up the average dividend yield of the stock over years.