There are few things that worry investors more than the dreaded "R" word: recession. But that could be what's headed our way.

Recently, the minutes from the Federal Open Market Committee's March meeting show that the 12-member body responsible for making monetary policy decisions is now forecasting a mild recession for later this year. While forecasts aren't written in stone, it's the first time we've seen clear guidance from the Fed that economic growth could shift firmly into reverse.

A neatly staggered pile of financial newspapers, with one headline visible, which reads, Recession Fears.

Image source: Getty Images.

Although stocks don't move in unison with the U.S. economy, history shows that peak-to-trough drawdowns in the S&P 500 are more pronounced during, not before, recessions are declared. In simpler terms, stocks struggle over the short-term when recessions occur.

But that's not cause for concern if you're a long-term investor. Temporary weakness in equity prices can create a phenomenal opportunity for the patient -- especially when it comes to the innovative growth stocks found in the Nasdaq 100. The Nasdaq 100 is comprised of the 100 largest nonfinancial companies listed on the Nasdaq exchange.

If a U.S. recession does take shape, two Nasdaq 100 stocks stand out as phenomenal companies that can be bought hand over fist, while another brand-name Nasdaq 100 company is best avoided.

Nasdaq 100 stock No. 1 to buy if the U.S. is headed into a recession: Palo Alto Networks

The first stock that makes for an absolute no-brainer buy if a recession does materialize is cybersecurity stock Palo Alto Networks (PANW 0.91%). Although stocks with premium valuations usually take it on the chin during recessions, Palo Alto has a couple of tricks up its sleeve that'll allow it to weather whatever the U.S. economy throws its way.

To begin with, Palo Alto Networks has macro trends working in its favor. In the wake of the COVID-19 pandemic, businesses are shifting their presence and data online and into the cloud at an accelerated pace. This means third-party providers are being counted on more than ever before to protect this sensitive information. Considering that robots and hackers don't have off days, demand for cybersecurity solutions is a growing constant.

What's really helped set Palo Alto Networks apart from its competition has been the company's shift to cloud-based software-as-a-service (SaaS) solutions. While Palo Alto continues to sell firewall products, SaaS subscriptions and services accounted for nearly 79% of fiscal second-quarter sales (ended Jan. 31, 2023). 

It can't be overstated how important this shift to cloud-based SaaS is for Palo Alto. Cloud-native solutions are considerably nimbler than on-premises solutions and typically incorporate artificial intelligence (AI) and machine-learning software. What's more, SaaS subscriptions generate juicier margins and lead to higher gross revenue retention.

Another reason to be excited about Palo Alto's future, even with a potential recession on the horizon, is the growth it's seeing from add-on sales. While adding new customers is great, add-on sales are what really driving margins for SaaS-driven cybersecurity companies. For instance, the number of clients using at least four Prisma Cloud solutions jumped 114% from the prior-year period in the latest fiscal quarter. 

Palo Alto isn't fundamentally cheap, but it doesn't need to be if it continues to deliver like this.

Nasdaq 100 stock No. 2 to buy if the U.S. is headed into a recession: Broadcom

A second Nasdaq 100 stock to buy hand over fist if the U.S. is angling toward an economic downturn is semiconductor solutions specialist Broadcom (AVGO 3.84%).

Since chip stocks are highly cyclical, the vast majority would be expected to struggle during a recession. However, Broadcom has catalysts to help it ride out economic downturns better than many of its peers.

One of the primary reasons Broadcom stands head-and-shoulders above its competition is the company's backlog. Even though CEO Hock Tan didn't share where Broadcom closed out 2022, the company had $31 billion in product backlog at the end of July 2022. Having such a sizable backlog, and booking orders 50 weeks in advance, helps ensure the company will enjoy predictable operating cash flow no matter how poorly the U.S. economy performs. 

Broadcom's core focus is another catalyst that should help it navigate a potential economic slowdown. Most of the company's sales come from developing and manufacturing next-generation wireless chips used in smartphones. Since it took about a decade for wireless infrastructure to be upgraded to support 5G download speeds, it wouldn't be a surprise to see a steady device replacement cycle continue, even if economic activity slows.

Furthermore, wireless access and smartphones have trended toward becoming basic necessities. Historically low churn rates for wireless providers suggest an unwillingness of consumers to give up their smartphones or wireless access. That's more good news for Broadcom's bottom line.

Lastly, don't overlook the importance of Broadcom's juicy dividend. Since 2010, Broadcom's quarterly payout has catapulted higher by nearly 6,500%. A 3% yield may not sound like much, but it can go a long way to calming investors' nerves in an industry that can get whipsawed by emotion.

Multiple graphics processing units lined up neatly in a row.

Image source: Getty Images.

The Nasdaq 100 stock to avoid if a U.S. recession takes shape: Nvidia

However, not every Nasdaq 100 growth stock is going to be well-positioned if the U.S. falls into a recession. Graphics processing unit (GPU) kinging Nvidia (NVDA 6.18%) serves as the perfect example.

Nvidia's stock has crushed it in 2023, largely due to the buzz surrounding AI. Artificial intelligence involves using software and systems to handle tasks typically undertaken by humans. The intriguing aspect of AI is the utilization of machine-learning, which allows software and systems to evolve/grow smarter over time. Virtually all sectors and industries can use AI in some capacity, which is what gives AI such robust growth prospects throughout the decade.

Although Nvidia has proprietary AI applications, such as virtual chatbots for enterprises, its biggest impact should be felt via its GPUs. The company's AI-focused GPUs are what make split-second decision-making possible for data-center-driven AI solutions.

But there are a couple of reasons to be highly cautious of Nvidia stock. For starters, every next-big-thing investment dating back 30 years has been overhyped. The internet, genomics, business-to-business commerce, 3D printing, and the metaverse are just some examples of game-changing innovations that were pumped well ahead of their time. Chances are we're seeing the same thing happen with AI.

Something else to consider is that Wall Street has far less tolerance for premium valuations during a bear market and/or recession. Whereas Palo Alto has the luxury of operating in what's effectively a basic necessity industry (cybersecurity), this isn't the case for Nvidia. Investors are going to be hard-pressed to pay 60 times Wall Street's forecast earnings in fiscal 2024 for a company whose sales growth stalled out last fiscal year.

To build on the previous point, one of Nvidia's most important money-making operating segments has been a dud of late. While gaming fueled sizable revenue and profit gains, gaming revenue has fallen off a cliff in each of the past three fiscal quarters. 

As a company, Nvidia should be just fine over the long run. As an investment, it's priced for perfection in an economic environment that's anything but perfect.