Nvidia (NASDAQ: NVDA) stock has enjoyed a remarkable artificial intelligence (AI)-related surge since the beginning of 2023, and that's not surprising as the company is providing the critical building blocks needed for the proliferation of this technology.

Nvidia's graphics processing units (GPUs) are helping its customers train AI models and deploy them, which explains why there is a huge demand for its chips. As a result, Nvidia's revenue and earnings have been growing rapidly in recent quarters, and the good part is that the company could sustain its impressive momentum as more AI infrastructure is built.

However, concerns are that an eventual slowdown in AI chip demand could negatively weigh on Nvidia's prospects in the long run. That's why investors should consider buying shares of Microsoft (MSFT 0.95%) and Meta Platforms (META 1.16%) -- both Nvidia customers -- as these two companies could turn out to be bigger AI beneficiaries than Nvidia decades from now.

1. Microsoft

Just like Nvidia, Microsoft has been one of the pioneers in the field of AI thanks to its partnership with ChatGPT creator OpenAI. This partnership has placed Microsoft at the forefront of the AI revolution in multiple fast-growing markets.

From workplace collaboration software to personal computers (PCs) to cloud computing, Microsoft has been integrating OpenAI's expertise in multiple areas to capitalize on the proliferation of AI. For instance, Microsoft's Azure cloud business is now growing at a faster pace thanks to the improving adoption of the company's AI-focused tools, which allow customers to use its platform to build and deploy generative AI solutions.

This is evident from the fact that out of Microsoft's 53,000-strong Azure AI customer base, a third started using its services in 2023. Additionally, Microsoft management pointed out on the company's January earnings conference call that its Azure cloud business got a boost of 6 percentage points because of AI, clocking year-over-year growth of 30%.

It won't be surprising to see Microsoft's cloud business gaining more traction. That's because its customers can gain access to multiple large language models (LLMs) to build their AI applications without having to invest in expensive hardware. Grand View Research estimates that the cloud AI market could generate close to $650 billion in revenue by 2030. That's bigger than the $305 billion revenue that the AI chip market is forecast to generate at the end of the decade, indicating that Microsoft is sitting on a much bigger AI opportunity than Nvidia.

This, however, is just one of the many AI-related catalysts for Microsoft. For instance, the adoption of AI-enabled PCs could give Microsoft's growth a big boost in the future. According to market research firm Canalys, shipments of AI-capable PCs are expected to increase at an annual rate of 44% through 2028, hitting 205 million units at the end of the forecast period.

Microsoft is looking to capitalize on this opportunity with Copilot Pro, a subscription service priced at $20 a month that will give PC users access to AI tools in multiple applications such as Word, Excel, Outlook, and PowerPoint, enabling them to create images with generative AI prompts and gain priority access to popular LLMs. Bloomberg Intelligence estimates that the market for specialized generative AI assistants could be worth $89 billion in 2032 as compared to just $447 million in 2022, which means that Microsoft's move to monetize its Copilot could help the company reap rich rewards.

So, even though Microsoft may not be matching Nvidia's stellar growth rate right now, it seems capable of delivering steady growth for a long time to come thanks to the growing AI adoption in multiple end markets that could turn out to be more lucrative than the AI chip space.

The good part is that Microsoft's growth rate is picking up nicely following the advent of AI. That's why investors will do well to buy this stock as it is trading at a reasonable 38 times trailing earnings right now compared to Nvidia's rich price-to-earnings (P/E) ratio of 73.

2. Meta Platforms

Digital advertising is another industry that's expected to benefit from AI adoption, with advertisers using the technology to improve audience targeting so that they can enhance their returns on ad dollars spent. Bloomberg is forecasting generative AI-based ad spending to jump to $192 billion in 2032 from only $57 million in 2022.

Meta Platforms is a top way to play this opportunity thanks to the growing popularity of the company's AI-focused tools and a huge user base. The company has been rolling out generative AI features for advertisers since last year and is claiming that they are driving solid improvements in advertisers' returns.

More importantly, the company is looking to push the envelope with new initiatives such as deploying its Meta AI chatbot to popular platforms such as Messenger, Instagram, and WhatsApp, which will bring its AI tools to a much larger user base. Meta AI is a generative AI assistant that answers users' queries and also allows them to create images with text prompts. Given that Meta ended 2023 with almost 4 billion monthly active users across its various apps, the company is sitting on a terrific monetization opportunity.

All this explains why consensus estimates are predicting an acceleration in Meta's earnings growth to an annual rate of 26% over the next five years as compared to 10% a year in the previous five years. Meta can sustain such healthy earnings growth for a longer period considering the multibillion-dollar opportunities in digital advertising and generative AI assistants.

This is precisely the reason why buying Meta Platforms stock is a no-brainer right now. It is trading at just 25 times forward earnings as compared to a trailing P/E ratio of 35, which points toward robust bottom-line growth. Also, this AI stock is cheaper than the likes of Nvidia and is trading at a discount to the Nasdaq-100 index's forward P/E ratio of 27 (using the index as a proxy for tech stocks), giving investors all the more reason to buy Meta Platforms as AI could send this stock soaring for a long time to come.