Late last week, we saw many FAANG stocks report their second-quarter results. These are some of the most consequential companies in determining where the broad market will head over the next three to five years.

While stalwarts like Amazon and Apple pleased investors with their earnings, I was most interested in how Alphabet (GOOGL 10.22%) (GOOG 9.96%) -- Google's parent company -- is performing with its advertising business in the middle of a slowing economy. And boy, did the company deliver.

Here's why its second-quarter earnings show once again why Alphabet is the best FAANG stock to own right now. 

Second-quarter earnings: Search is still king

Alphabet reported its second-quarter results on July 26 for the three months ending in June. Revenue grew 16% year over year in constant currency to $69.7 billion. The majority of this growth came from Google Search, which is still the majority of Alphabet's business, even in 2022. The segment generated $40.7 billion in revenue last quarter, up from $35.8 billion a year ago (a 13% jump).

Even with consumers around the world transitioning from buying durable goods during the pandemic to spending on travel and experiences, Google Search is still a big part of their lives -- and therefore advertisers' lives.

Contrast these results with the other digital advertising giant, Meta Platforms, parent of Facebook and Instagram. It saw revenue decline by 1% year over year in the second quarter due to various factors, including operating system privacy changes from Apple and increased competition from ByteDance's TikTok.

Unlike other digital advertising businesses, Google (especially Search) faces minimal legitimate competition, making it less likely to be disrupted. While this could be a concern from an antitrust standpoint, it leaves the business on rock-solid footing even if we head into a recession.

Cloud losses and "other bets" mask profitability

Alphabet's operating income was $19.5 billion in the second quarter for an impressive 28% operating margin. But this masks the true profitability of Alphabet's core Google businesses. If we only look at Google Services, the segment generated $22.8 billion in operating income on $62.8 billion in revenue for an operating margin of 36% -- much higher than what Alphabet's consolidated numbers suggest.

So where are the losses coming from? That would be Google Cloud and its "other bets" segment. Google Cloud is a competitor to Amazon Web Services (AWS) and is growing quickly. Revenue hit $6.3 billion in the second quarter, up 36% year over year, but the segment had an operating loss of $858 million.

Given how profitable AWS has become at scale, investors should expect Google Cloud to start generating positive operating income within the next three to five years.

Other bets is Alphabet's division for moonshot projects or highly speculative bets on emerging technologies. These include projects like Waymo (self-driving cars) and DeepMind (artificial intelligence research). The segment only did $193 million in revenue last quarter and had an operating loss of $1.69 billion, contributing to the majority of the difference between Google Services' operating income and Alphabet's consolidated earnings power.

The profit potential for these segments (especially other bets) is hard to forecast compared to Google Search, but there are very few businesses that can fund billions of losses a year for new high-growth ventures while still generating tons of cash for shareholders. This gives Alphabet optionality and a scale advantage versus almost every other company.  

Valuation and share repurchases

GOOG Free Cash Flow Chart

GOOG free cash flow. Data by YCharts.

Perhaps the best part of Alphabet stock right now is that investors can buy shares in this dominant company at a reasonable price. At a current market cap of $1.5 trillion, it has an enterprise value of $1.36 trillion when you subtract its cash and marketable securities. Over the last 12 months, the company has generated $65 billion in free cash flow, giving the stock an enterprise value to free cash flow (EV/FCF) ratio of 21, or right around the market average. And this is while the company is investing heavily in Google Cloud and other bets, masking its true profitability.

On top of this reasonable valuation, Alphabet has been pouring its excess cash into share repurchases (as you can see with the declining share count in the chart above). This will juice growth in FCF per share, the true determinant of shareholder returns over the long haul. Add this into the mix, and Alphabet is my favorite FAANG stock to buy right now