Nvidia (NVDA -0.42%) has become the standard bearer for the advent of artificial intelligence (AI) and the potential for significant productivity increases resulting from the widespread adoption of the technology. The company's state-of-the-art processors have essentially cornered the market for AI applications. However, Nvidia is seeing increasing competition, which is weighing on the stock in recent weeks.

One Wall Street analyst believes this represents a buying opportunity.

The best way to capitalize on AI

Morgan Stanley analyst Joseph Moore raised his price target on Nvidia to $1,000 while maintaining an overweight (buy) rating. That represents potential gains of 17% compared to Tuesday's closing price. The analyst notes that Nvidia stock is down about 10% from its peak, giving investors a compelling opportunity to buy shares.

Moore goes even further, suggesting that owning Nvidia stock is the "best way" to capitalize on the shift to generative AI, as investments in the technology are only beginning to ramp up.

I'm completely on board with this logic. Data centers are in the midst of a massive upgrade cycle to handle the computational horsepower needed to run AI workloads. Furthermore, the construction of new data centers is booming. One example is the $100 billion data center project planned by Microsoft and OpenAI dubbed "Stargate."

CEO Jensen Huang estimates there will be $2 trillion in data center spending over the coming four to five years. With a 95% share of the GPU data center market, this will result in continuing strong demand for Nvidia's processors.

Nvidia stock currently sells for 73 times trailing 12-month earnings. Analysts' consensus estimates are calling for earnings per share (EPS) of $24.48 in 2025 and $30.63 by 2026. If the analyst's price target is on track, that would shrink Nvidia's price-to-earnings (P/E) ratio to 41 next year and 33 the year after, which illustrates why Nvidia stock is still a bargain.

For those reasons and more, Nvidia stock is a buy.