To kind of repeat what others have said, the question is not whether AI is the future (it is, or at least a big part of it), but who is going to monetize it. The universe of companies that took off in the .com bubble is much bigger than the universe of companies that actually made money off the widescale adoption of the internet. I assume that if you bought the right companies at the peak of the tech bubble, you'd still be looking at a solid annualized return at this point.
I think the same thing is going to happen with AI. I think the thing that is different is there is so much investment required for the current models of AI, I think you can feel relatively confident that one of the front leaders is going to be the big winner. Even if an upstart surprises, unless they have an advance that doesn't require major investment to scale, I would assume they'll be bought by one of the front runners with tons of capital. So it will probalby be MIcrosoft/OpenAI, XAi, Alphabet, Meta, Amazon etc among the winners. I guess companies like Nvidia are the "sell the shovel during the gold rush" type approach that is pretty sure to make some money, but the question there is are they going to make money that justifies their current valuation.