After a dismal 2022, Meta Platforms (META 2.05%) stock fired up the afterburners in 2023, with shares up roughly 162% so far this year (as of this writing), more than 13 times the gains of the S&P 500. This marks a stark reversal of fortune compared to last year when the stock plunged more than 64%. 

The blistering gains this year came in response to a return to revenue growth after several quarters of declines. The social media empire also got a boost from the potential implications of its use of artificial intelligence (AI).

Investors that sat out Meta Platforms' current sprint higher are left with a quandary. Should they simply buy now in the hopes of further gains or avoid the stock because of its frothy valuation and the remaining uncertainty in the digital-advertising industry? Let's take a look.

Tween filming friends with smart phone.

Image source: Getty Images.

Why did Meta Platforms stock plunge last year?

The macroeconomic headwinds that made headlines last year hit many companies but Meta Platforms arguably among those hardest hit. It's well-documented that marketers rein in spending in response to challenging conditions, as advertising is a budget item that's easy to adjust on short notice. Furthermore, Meta Platforms makes the vast majority of its revenue from the digital advertising that appears on its family of social media sites. In fact, as the world's second-largest online advertiser -- with 20% of the market -- the company is particularly vulnerable to economic downturns. 

The vast majority of technology stocks took it on the chin last year, but the downturn in marketing spending caused Meta to report three consecutive quarters of year-over-year revenue declines -- the first such drops in the company's storied history. Investors were naturally concerned, with the most skittish investors abandoning the stock. The short-sightedness proved costly; a return to form this year sent the stock rocketing higher, as digital advertising rebounded and Meta Platform's investors reaped the windfall.

Yet the recovery has only just begun. In the second quarter, the company grew revenue by 11% year over year, while its earnings per share jumped 21%. This puts Meta within striking distance of achieving new high watermarks for sales and profits.

What could drive Meta stock higher?

The ongoing recovery in online advertising aside, there are other catalysts that could propel Meta Platforms stock higher.

Generative AI made headlines this year, and Meta Platforms has staked a claim to benefit from these recent advances. While the company has long used AI for a variety of purposes, Meta now has plans to unleash these next-generation algorithms on its digital-advertising business. Specifically, Meta is one of the few companies out there with the resources to develop the large language models necessary to create generative AI models.

Just this week, Meta introduced a host of free AI-fueled marketing tools for merchants that advertise on its platforms. Meta's Ads Manager will have the ability to customize images and text to help merchants better reach their target markets. AI will help them craft backgrounds, easily adjust aspect ratios, and generate multiple versions of an ad to suit a variety of advertising channels. 

So, while the ability to use AI may be in the distant future for some businesses, Meta is deploying the technology now to help jump-start its growth.

How to approach Meta stock now

Meta is currently selling for 37 times trailing-12-month earnings and roughly 7 times sales, so the stock is no longer a screaming buy. In the light of this somewhat frothy valuation, it's perfectly understandable that some investors might want to take a pass.  

However, Meta looks much more reasonable when viewed through the lens of its future opportunity, as it's only selling for 24 times next year's earnings and 5 times next year's sales. Why? The company is expected to return to double-digit sales and earnings-per-share growth between now and the end of 2024. 

The recovery in the digital-advertising market has already begun, but there's much more work to do. Meta is handing out its AI expertise for free to advertisers, so I wouldn't be surprised if they begin to flock to the platform in increasing numbers.

Even given the potential for market volatility caused by the ongoing economic uncertainty, buying Meta Platforms now will look like a brilliant move five or 10 years from now, particularly given the long runway ahead.