Nvidia (NVDA 0.03%) has been one of the top ways to play the artificial intelligence (AI) boom, as customers line up to buy its powerful graphics cards so that they don't miss out on the fast-growing adoption of this technology that's expected to give the global economy a huge boost.

According to PwC, AI could add a whopping $15.7 trillion to global GDP (gross domestic product) by 2030. Nvidia will play a central role in driving this AI-related economic growth thanks to its graphics processing units (GPUs), which play a major role in training large language models (LLMs) and developing AI applications.

All this explains why Nvidia has been growing at a breathtaking pace, leading to an impressive surge in its stock price.

NVDA Chart

NVDA data by YCharts

However, Nvidia's rally wouldn't have been possible without its foundry partner, Taiwan Semiconductor Manufacturing (TSM 0.14%), popularly known as TSMC. That's because Nvidia is a fabless semiconductor company, which means that it only designs its chips but leaves the manufacturing part to foundries such as TSMC.

So investors looking for an Nvidia proxy to play the AI boom would do well to buy shares of TSMC, as it looks set to join the trillion-dollar market cap club thanks to the impressive upside it is likely to deliver. Let's see why that may be the case.

TSMC's capacity expansion should help accelerate its growth

TSMC has been rapidly expanding its manufacturing capacity to help Nvidia meet the terrific demand for its AI chips. The company has allocated an estimated 40% to 50% of its advanced chip packaging capacity to Nvidia so that the latter can increase its AI chip supply, according to market research firm TrendForce.

More importantly, TSMC is reportedly going to increase its advanced chip packaging -- formally known as a chip on wafer and wafer on substrate (CoWoS) -- capacity to 240,000 units this year from 120,000 units last year. By the end of the year, TSMC is expected to ramp up its monthly CoWoS packaging capacity to 26,000 to 28,000 wafers a month, suggesting that Nvidia could continue to improve the output of its AI chips.

What's more, TSMC has now received a $6.6 billion grant from the U.S. government, along with a $5 billion loan facility, so that it can build more factories in Arizona. TSMC is already building two facilities in Arizona that will go online in 2025 and 2028, and it is now going to build a third site following the latest grant. In all, TSMC is set to spend $65 billion on the three U.S. plants.

The third plant will be set up for manufacturing advanced 2-nanometer (nm) chips, which will be deployed for AI and military applications. It is worth noting that TSMC is expected to begin the trial production of 2nm chips for Nvidia so that it can start mass-producing these chips in 2025.

The move to a 2nm process is likely to play an important role in helping Nvidia maintain its dominance in the AI chip market. For instance, by moving from a custom 5nm architecture for its Hopper AI GPUs to a custom 4nm process from TSMC for its upcoming Blackwell GPUs, Nvidia is claiming that it can deliver a 7x to 30x jump over its current flagship H100 processor, while also reducing power consumption by up to 25 times.

So TSMC looks all set to benefit from Nvidia's AI chip dominance, and this should ideally help drive stronger growth in the company's revenue and earnings. That's probably the reason why analysts have significantly bumped their earnings growth expectations for TSMC.

TSM EPS Estimates for Current Fiscal Year Chart

TSM EPS Estimates for Current Fiscal Year data by YCharts

The stock's valuation and potential upside indicate that buying it is a no-brainer

TSMC stock trades at 28 times trailing earnings and 23 times forward earnings. Both multiples are lower than the Nasdaq-100's earnings multiple of 30 (using the index as a proxy for tech stocks). We saw in the chart in the previous section that TSMC's bottom line could jump just over $9 per share in 2026.

Assuming TSMC does hit that mark and trades at 30 times earnings after three years, in line with the Nasdaq-100's earnings multiple, its stock price could hit $270 -- an 86% jump from current levels. TSMC currently commands a market cap of $750 billion, which means that it is well on course to join the trillion-dollar market cap club within the next three years.

All this indicates why investors looking for an AI stock trading at an attractive valuation should consider buying TSMC hand over fist, as it seems built for terrific upside that could help take its market cap well beyond $1 trillion.