After sinking 39% in 2022, Alphabet (GOOGL -1.09%) (GOOG -1.05%) shares rewarded investors last year, rising an impressive 58%. This gain exceeded what the Nasdaq Composite Index was able to produce. There is certainly a sense of renewed optimism when it comes to not only this tech giant, but its peers as well.

So, is this FAANG stock a buy right now? Let's consider some key points to come to an informed conclusion about Alphabet.

Strength in digital advertising

In 2022, amid rising interest rates and inflationary pressures, the digital advertising market took a hit. From a marketing executive's perspective, why spend to target consumers when they have less to spend on discretionary items? This led to softer reported growth from Alphabet, particularly when compared to consistent double-digit top-line gains in previous years.

But things picked up in 2023. In each of the last three quarters, revenue growth accelerated, with an 11% gain in Q3 last year. Management called out growth in ad spending in the retail sector as a key factor. Moreover, YouTube revenue of just under $8 billion exceeded Wall Street analyst estimates.

Looking ahead, Alphabet is well positioned to continue dominating the digital ad industry, of which it commands a whopping 39% share on a global basis. According to Grand View Research, the sector is poised to reach more than $1 trillion in worldwide revenue by 2030. This should result in sustainable growth for the business over the long term.

Growth is part of the story

For a company that generated $297 billion of trailing-12-month revenue, investors are right to be skeptical of where Alphabet's growth going forward will come. But I believe this concern is a bit overblown. Consensus analyst estimates call for sales to rise at a compound annual rate of 10% between 2022 and 2025, while diluted earnings per share increased at a 19% annualized clip.

Besides digital advertising, Alphabet will benefit from growth in the cloud computing sector. Google Cloud was able to increase revenue 22% in the 2023 third quarter to total $8.4 billion. And the company posted its third straight quarter of positive operating income, an encouraging trend to monitor.

With Google Cloud, Alphabet has a valuable platform that it can use to introduce new artificial intelligence (AI) features, like generative AI and machine learning capabilities. These initiatives will bolster Google Cloud's importance to its client base, a roster that includes well-known names like Lyft, Major League Baseball, Walgreens Boots Alliance, and PayPal.

The ongoing rise of streaming entertainment will propel YouTube, which counts 2.7 billion users. According to data from Nielsen, Alphabet's user-generated video platform attracts more TV viewing time in the U.S. than any other streaming service, including Netflix. As a result, YouTube should grow in importance for Alphabet over time.

What about the valuation?

One year ago, Alphabet shares were trading at a price-to-earnings (P/E) ratio of just 19.2. With the benefit of hindsight, that ridiculously cheap valuation was a fantastic buying opportunity, as the stock's performance in the last year has shown.

However, all hope isn't lost. As of this writing, shares are trading hands at a P/E multiple of 27. This looks like an expensive price to pay at first glance, but Alphabet's valuation represents a discount to the other "Magnificent Seven" stocks. Investors looking for big tech exposure could do worse than buy Alphabet shares.

It's best not to overthink things. This is a dominant enterprise that has solid growth prospects over the long term. Adding the stock to your portfolio is a smart decision.