It has been a good year for Taiwan Semiconductor Manufacturing (TSM 0.19%), both from a business and stock standpoint. Through Sept. 25, the stock is up over 39% year to date and nearly 54% in the past 12 months.

Considering its stock price run, investors may be wondering if they missed the boat, but there's one key reason the rally may continue: the expected spending on artificial intelligence (AI) infrastructure in the coming years.

A picture in front of a Taiwan Semiconductor Manufacturing building.

Image source: Taiwan Semiconductor Manufacturing.

TSMC, as the company is often called, is the world's leading semiconductor (chip) manufacturer by a large margin. It has long been the go-to foundry for chips used in electronics such as smartphones, computers, TVs, and similar devices. Now, given the recent AI boom, AI chips have become a huge part of its business. In the second quarter (Q2), its high-performance computing segment, which includes AI chips, accounted for 60% of its revenue.

To say that TSMC has a monopoly on manufacturing advanced AI chips would be an understatement. Nearly all of the advanced AI chips used in AI infrastructure, particularly in data centers, are manufactured by TSMC. And when Nvidia had its Q2 earnings call, one piece of info stood out that should bring smiles to TSMC and its investors' faces.

Nvidia said it expects to see $3 trillion to $4 trillion in AI infrastructure spending by the end of the decade. Of course, this won't all go into TSMC's pockets, but as the undisputed leader in chip manufacturing -- which is critical to training AI models -- TSMC can expect a good amount of this to trickle down into its business in some form or fashion.