Earnings season is kicking off again, and one of the biggest companies to report earnings so far is Taiwan Semiconductor Manufacturing (TSM -1.84%), or TSMC as it's also known.

TSMC is the world's biggest manufacturer of semiconductors, and it pioneered the foundry model. Unlike most semiconductor manufacturers, TSMC doesn't do any chip design. It's a third-party foundry, meaning it only manufactures chips for other companies like Apple, Nvidia, Advanced Micro Devices, and others.

That position makes it a bellwether in the industry as it handles more than half of third-party chip production in the world and roughly 90% of advanced chip production. TSMC has already been a winner in the AI era, and those AI tailwinds were on display again in the second-quarter earnings report.

When revenue in the quarter jumped 38.6% to $30.1 billion, CFO Wendell Huang said, "Our business in the second quarter was supported by continued robust AI and HPC-related demand."

TSMC's margins also improved with gross margin increasing 53.2% to 58.6%, an indication that the company is sharing in the spoils of the AI boom that have propelled stocks like Nvidia to all-time highs. The rise in gross margin seems to reflect the company's pricing power and increasing demand, and the complexity of AI chips.

Advanced technologies, which are considered to be 7-nanometer (nm) chips or less, accounted for 74% of wafer revenue. More specifically: 36% came from 5nm, 24% from 3nm, and and 14% from 7nm chips. High-performance computing (HPC) chips generated 60% of TSMC's revenue, another sign that AI is driving the boom at the company.

Outside of direct costs, TSMC's expenses are relatively minimal, and the company finished the quarter with an operating margin of 49.6%, another sign of its competitive advantage. On the bottom line, it reported earnings per American Depositary Receipt (ADR)  of $2.47. The stock finished last Thursday's session up 3.4% on the report.

A semiconductor being made.

Image source: Getty Images.

Can TSMC keep climbing?

With those gains, TSMC shares are up 23% year to date and have delivered steady gains since ChatGPT came out -- with the exception of the sell-off of the Liberation Day tariffs. Some investors have steered away from the company because it's headquartered in Taiwan, and there's a risk of China invading the island, though it appears to be small.

However, for the business itself, its competitive advantages look more robust than ever. It has dominant market share in its industry. The next largest foundries, Samsung and Intel, have stumbled of late, and it seems to have a large lead in its technology capabilities.

TSMC continues to look affordably priced at a price-to-earnings ratio of 29. Like the rest of the sector, the stock is vulnerable to the semiconductor cycle, and growth could slow, especially as the AI market matures. However, that valuation is in line with the S&P 500, but TSMC is growing much faster and seems like it has a clear runway for growth.

Is this the only AI stock you need?

TSMC may not achieve the skyrocketing growth of a company like Nvidia, but it could be the best way to get broad exposure to the AI boom. The stock has a wide economic moat, and its reasonable valuation also makes the stock an attractive buy.

This isn't the only AI stock you need as there are plenty of other promising and high-performing stocks in the industry, but if you're new to investing or the AI sector, TSMC is an excellent first choice. Even after its rally over the past year, the stock has more upside potential. If AI continues to grow, TSMC will be a winner.