Practically every investor wants to become a millionaire from stock investing. However, it's not easy. First, becoming a millionaire doesn't happen overnight (unless you're starting with nearly $1 million). It takes years to identify and buy strong companies at good prices.

While one or two stocks may not make you a millionaire by themselves, choosing the right ones can significantly accelerate your timeline. If you're looking for a stock that can beat the market, then I've got a couple that can easily accomplish that feat and are worth buying right now.

Taiwan Semiconductor

Taiwan Semiconductor (TSM 1.08%) could be the most important tech company on the planet. Its industry-leading semiconductor foundry makes chips for nearly every other big tech company out there: Nvidia, Apple, Alphabet, AMD, and more. Without its technology, our world wouldn't function the same.

The Taiwan-based company has been caught up in this recent sell-off and is down nearly 20% from its 2024 highs. However, given how vital TSMC is to nearly all tech companies, this doesn't make sense, especially after the quarter it recently reported.

In the second quarter, Taiwan Semi's revenue rose 33% year over year in U.S. dollars, and it gave guidance for 32% growth for the third quarter. It also has the added catalyst of a new chip generation coming out in late 2025 that is expected to provide much higher energy efficiency than current-generation chips.

Even with those fantastic investing points, TSMC's stock trades at a fairly attractive 24 times forward earnings. If you believe that artificial intelligence (AI) will continue to grow and that other high technologies will thrive in the future, TSMC is a great stock to buy right now.

Alphabet

Alphabet (GOOG 2.23%) (GOOGL 2.33%) is another top pick in the AI investing space. Although it's better known for its Google platform, Alphabet is heavily investing in many businesses that will help proliferate AI technologies.

First, Alphabet's large language model, Gemini, has overcome some initial blunders and has emerged as a top option for building generative AI models. This technology has also been incorporated into the Google search engine and has made its way onto Android phones. As Alphabet continues to improve and refine this model, it will become a great tool for AI developers to have in their toolkit.

Alphabet is also investing heavily in cloud computing. Cloud computing is a vital piece of infrastructure for AI, as few companies have the computing power necessary to train AI models. So, they rent out some of Alphabet's computing power in hundreds of data centers scattered across the globe. This has been an excellent growth driver for Alphabet, and the division produced 29% growth in the second quarter.

But its momentum might just be starting. About 60% of funded generative AI start-ups and almost 90% of generative AI unicorns (private companies worth at least $1 billion) are Google Cloud customers. As these companies grow, their usage will increase, which will turn into greater revenue for Alphabet. Additionally, Apple's AI model, Apple Intelligence, was trained on Alphabet's custom Tensor Processing Unit (TPU), which provides higher performance than Nvidia's GPUs when the workload is properly configured. GOOGL PE Ratio (Forward) Chart

GOOGL PE Ratio (Forward) data by YCharts.

This is an excellent company that trades at a fairly cheap 20.7 times forward earnings. Considering that the S&P 500 trades at 22.2 times forward earnings, Alphabet is now a cheaper-than-average stock. Few investors would place Alphabet in a worse-than-average position, so buying Alphabet's stock right now amid the market sell-off is a genius move.