"During a gold rush, sell shovels." - Unknown

There is currently an artificial intelligence (AI) gold rush happening in the technology sector. By now, you are probably aware of the revolutionary chatbot from OpenAI called ChatGPT and its $10 billion investment from Microsoft. Even with the venture capital sector in a major downturn, this spurred investors to pour a record amount of capital into AI companies this year.

It looks like a technological gold rush has started to take form. But how should an individual investor play this new trend?

Many investors looked at Nvidia -- whose shares have soared 185% year to date -- as a classic "picks and shovels" investment for the AI gold rush. Companies use Nvidia chips to power their AI products.

However, given Nvidia's rapid share price increase, there are better stocks to buy if you want exposure to the growth of AI. Here are two stocks that aren't Nvidia providing the picks and shovels for the AI revolution. 

Taiwan Semiconductor: Nvidia's manufacturing partner

First up is Taiwan Semiconductor Manufacturing (TSM 1.26%). Taiwan Semi is actually the supplier of Nvidia's computer chips, along with many other companies looking to build advanced semiconductor products, including Apple, Amazon, and Nvidia rival Advanced Micro Devices. The key with Taiwan Semi is it does not actually design and sell chips to end customers -- eliminating any competitive worries -- but focuses on being the best in the world at building advanced computer chips for others.

This strategy worked wonderfully and allowed Taiwan Semi to separate itself technologically from other computer chip manufacturers, forcing companies like Nvidia to sign with them if they want to build the most powerful computer chips in the world. Over the last 10 years, Taiwan Semi's revenue has grown by close to 300% to $75 billion, making it one of the largest businesses in the world. Operating income has grown even quicker in the last decade, up 446% to $37 billion, which shows the operating leverage achievable when building a ginormous manufacturing entity. 

The stock is not crazy expensive, either. At a current market cap of $471 billion, Taiwan Semi trades at just 13 times its trailing operating income, a number that should only look more attractive the more investment companies make in AI. Compared to Nvidia, which trades at 40 times sales, Taiwan Semi is a much better stock to buy at these prices.

TSM Revenue (TTM) Chart

TSM Revenue (TTM) data by YCharts

ASML Holding: Powering Taiwan Semi

But what about the picks and shovels for Taiwan Semi? Yes, we can go one step deeper into the semiconductor supply chain and buy a stock that supplies the crucial equipment that helps companies such as Taiwan Semi build the most advanced computer chips in the world.

Enter ASML Holding (ASML 2.04%). The European technology giant is the leading lithography machine maker, which allows semiconductor companies to make chips with transistors only a few nanometers apart. 

Without these machines, manufacturers like Taiwan Semi wouldn't be able to make advanced chips for their own customers like Nvidia. The best part about ASML is that it is the only entity in the world that has been able to make these advanced lithography machines. Not even China -- who has tried to copy the system -- has been able to replicate ASML's success. And this is the second-largest economy in the world.

ASML Revenue (TTM) Chart

ASML Revenue (TTM) data by YCharts

With this competitive advantage, ASML has been able to grow its revenue and profits at a significant rate for the last 10 years. Since 2013, revenue is up 355% to $25 billion, while operating income has ballooned 676% to $8.2 billion.

The stock is much more expensive than Taiwan Semi, trading at over 30x its trailing earnings. But with a monopoly in advanced lithography and a huge tailwind as its customers invest to build out more advanced semiconductor capacity, it is probable that ASML's earnings will continue to grow at a fast rate for many years. That makes the stock a solid buy at these prices.