Every now and then, some new investing trend sweeps through Wall Street like wildfire. In 2018, it was cannabis stocks that suddenly rose in popularity. In 2021, the metaverse attracted much of investors' attention. Now, artificial intelligence (AI) is the next big thing. AI is not new, but recent breakthroughs that led to generative AI apps like ChatGPT have sparked interest in the technology among investors.

Furthermore, AI is unlikely to be some fad that will eventually die down. While estimates vary, many analysts see the AI market expanding rapidly in the years ahead. Naturally, investors want to profit from it all. Two stocks that are great picks to do so are Alphabet (GOOG 1.11%) (GOOGL 1.05%) and Meta Platforms (META 0.08%). These two tech giants are using AI to improve their businesses, pursue other growth avenues, and build solid economic moats. 

1. Alphabet

Alphabet, the parent company of Google, used AI to improve its business for a while. The tech giant's efforts on that front include its recommendation algorithm on YouTube. While the details are complicated, YouTube collects data from users and content creators to send viewers the "best" video recommendations. And the more content users watch, the more accurate the AI-powered algorithm gets.

That's why some viewers intending to watch just a few targeted videos sometimes spend hours on the website. Alphabet also used AI to fine-tune its search algorithm over the years, and it was able to release a generative AI application called Bard. While many do not consider it as good as ChatGPT, Alphabet's innovation ability is one of the company's strongest assets. And the company is undoubtedly a leader in AI.

So, the company won't be left behind in the AI field as some seem to have thought earlier this year when Microsoft announced it was powering its search engine, Bing, with AI to challenge Google's dominance. This initiative ended up having little effect on Google's empire. One of the reasons for that is Google's powerful brand name -- a solid competitive advantage. Google has become an integral part of people's day-to-day lives. When in doubt, "Google it."

People won't change deeply entrenched habits overnight. Google also benefits from the network effect (when the value of a service increases with use), as does YouTube. These two branches of Alphabet's business -- Google and YouTube -- still have miles of growth. Companies will continue to flock to both platforms for advertising purposes since they are so popular, and the continued rise of streaming will be a significant tailwind for YouTube.

Furthermore, Alphabet is also a leader in the cloud-computing market, another area that will expand rapidly in the coming years.

Alphabet has consistently delivered excellent financial results for years.

GOOGL Chart

GOOGL data by YCharts.

That won't change soon. Alphabet's solid economic moat, innovative abilities, and multiple growth paths make it a stock worth owning. 

2. Meta Platforms

Meta Platforms is the parent company of Facebook, Instagram, and WhatsApp. Its use of AI to improve its business has been ramping up in recent years. For instance, one of Meta Platforms' fastest-growing businesses is Reels, or short-form videos designed to compete with TikTok. Meta Platforms also uses an AI-powered algorithm to keep viewers interested.

While Facebook and Instagram aren't primarily video-sharing websites and probably won't ever be as big as YouTube in that department, Reels have been growing rapidly, as the company reports. Its revenue run rate as of the end of the second quarter was $10 billion, up from $3 billion in the fall of 2022. Here's another crucial use of AI for Meta Platforms: The company has released various automated ad products (AI-powered, of course) to help businesses get the most out of their advertising campaigns.

In the company's Q2 earnings call, CEO Mark Zuckerberg said: "Almost all our advertisers are using at least one of our AI-driven products." There is more. Meta Platforms released an open-source, large language model to mount a challenge to the leaders in the AI field. This clearly signals that AI will increasingly become an integral part of Meta Platforms' operations even if management had not explicitly said so. But beyond AI, Meta Platforms is making it a point to ramp up business messaging on WhatsApp.

With 200 million business users on the app, the company sees a massive opportunity to help these businesses connect and communicate with their potential consumers. Of course, Meta Platforms hasn't given up on its metaverse dreams. One of Meta Platforms' biggest strengths is its ecosystem of more than 3 billion daily active users. Furthermore, some of its most important websites -- including Facebook and Instagram -- benefit from the network effect. 

All the company needs to do is find new ways to monetize its large user base, be it through the metaverse, turning its platform into an e-commerce hub, or various other initiatives. Despite a recent slowdown due to economic issues that affected the ad market, Meta Platforms' historical performance has been admirable.

META Chart

META data by YCharts.

Can anyone seriously challenge the company as the leading social media platform? In my view, that won't happen for the foreseeable future. That's why investors can safely buy and hold Meta Platforms' shares.