Meta Platforms (META -0.65%) stock has been on a tear in 2023, with shares up roughly 125%, or more than 8 times the gains of the S&P 500. This is in stark contrast to 2022, when the stock cratered over 64%.

The blistering move higher this year came as the social media titan returned to growth, with its rebound further fueled by the fervor surrounding all things artificial intelligence (AI).

This leaves investors who sat out Meta Platforms' current rally with a conundrum. Should they buy with the expectation of additional gains, or avoid the stock because of its lofty valuation and the remaining uncertainty regarding digital advertising? Let's take a closer look.

Person using smartphone to film three friends dancing on a sidewalk.

Image source: Getty Images.

Why was Meta Platforms down so much last year?

The economic challenges that characterized much of 2022 were the biggest headwind for Meta Platforms, since the adtech business fueling its social media platforms accounts for nearly all the company's revenue. From a historical standpoint, marketing budgets are among the first to be cut during uncertain economic times. As the second-largest digital advertiser worldwide -- commanding 20% of the market -- Meta is particularly susceptible to this phenomenon. 

Many technology stocks tumbled last year, but the slump in ad spending handed Meta Platforms two successive quarters of year-over-year revenue slumps, the first (and second) such declines in the company's history. This sent investors scrambling for the exits. However, when the economy recovers -- as it invariably will -- the digital ad dollars will once again flow freely, potentially sending Meta Platforms stock even higher.

Don't take my word for it. As recently as 2021, Meta Platforms increased revenue by 37% year over year and earnings per share by 36%. This clearly illustrates that it's the economic climate that's weighing on Meta's performance -- and this, too, shall pass.

What could drive Meta stock higher?

In addition to a potential rebound in the digital advertising market, Meta Platforms has other catalysts that could send its stock up.

AI is one such driver. While Meta isn't an AI stock in the strictest sense of the word, the company has long employed the technology to boost its business results. These advanced algorithms assist in matching users with relevant content, while also helping target its advertising.

Another more recent example is the company's AI-enhanced advertising tool Advantage+. In the first quarter, Meta revealed that "Reels monetization efficiency is up over 30% on Instagram and over 40% on Facebook quarter-over-quarter. Daily revenue from Advantage+ Shopping Campaigns is up 7x in the last six months." 

This seems to confirm data the company released late last year that suggested advertisers that used Advantage+ reported 17% lower cost per acquisition, as well as a 32% increase in return on ad spending. 

So, while AI may be pie-in-the-sky for some businesses, Meta is using the technology to increase its ad revenue.

How to approach Meta stock now

Meta is currently selling for 14 times trailing-12-month earnings and roughly 3 times sales, so the stock isn't the screaming bargain it was late last year. Given this somewhat lofty valuation, value investors might choose to take a pass on Meta. However, I'd respectfully submit that's a pretty fair price to pay for a company that's expected to grow revenue and earnings per share by double digits from now through the end of 2024.

That said, and as I've spelled out above, Meta Platforms not only has a recovery in the advertising market to look forward to but also the potential for AI to supercharge its ad business. Even with the potential for a little volatility and the uncertainty in the economy, buying Meta Platforms stock today will look like a brilliant move five years from now -- particularly given the company's robust long-term prospects.