The semiconductor industry has had its fair share of challenges recently, from macroeconomic pressure to shortages in the manufacturing infrastructure. But as the industry bounces back, there are plenty of opportunities for investors to profit -- you just have to know where to look. The tide is rising but it may actually leave some boats behind.

So let's look at some of the best and worst investments in the semiconductor industry, so you can make informed decisions and come out on top. Below, you'll find two semiconductor stocks that deserve your consideration the next time you have some investable cash on hand, and one you probably should stay away from even in a sectorwide recovery.

Intel is the safest turnaround story you'll see in 2023

Computer processors giant Intel (INTC 0.64%) has been hanging out in Wall Street's bargain bin for quite a while. Arch rival Advanced Micro Devices is stealing market share from the sector leader in key markets such as desktop and server processors, and Intel's attempts to gain a foothold in mobile devices never gained traction. You can trace most of Intel's troubles back to origin stories many years ago. The last couple of leadership teams have not been up to the task of managing Intel's formerly dominant market position.

Fortunately, I'm convinced that Intel's business is back under competent leadership again. Current CEO Pat Gelsinger is an engineer at heart with decades of processor design experience. His career at Intel spans three decades, with a nine-year break to gain CEO experience at virtual machine expert VMware. Gelsinger has a deep understanding of what it takes to produce successful chips in Intel's target markets, his leadership style earns industry-leading reviews from Intel's workers, and the company's culture is turning back to innovation under his capable hand.

Iron out all the kinks in the design and production process that earlier teams left behind is taking some time, due to the semiconductor industry's lengthy development pipelines and costly chip-making machinery. Gelsinger is now two years into his turnaround efforts, and Intel investors should start to see tangible results soon enough.

I can't promise for sure that 2023 will be the year of Intel's return to the chip sector throne, but I'd be shocked if the recovery dragged all the way into 2025. Meanwhile, you can pick pretty much any valuation ratio you like and find that Intel's stock is trading far below its 10-year and five-year averages in each case.

So Chipzilla's stock is due for a bounce, either this year or the next. Either way, I don't think you can go wrong picking up some Intel stock on the cheap right about now.

ASML Holdings is a capacity-constrained winner

Chip-making equipment manufacturer ASML Holdings (ASML -1.03%) offers a very different approach to the semiconductor market. If Intel is a deep-discount turnaround bet, investing in ASML lets you tag along with a market-beating winner in full flight.

The company makes advanced lithography machines, which are a crucial part of the chip-making process. In particular, ASML has a patent-protected stranglehold on key technologies required for the latest generations of semiconductor manufacturing, using chip traces of 7 nanometers and below. Smaller traces lets you squeeze chip designs down to smaller silicon footprints, which leads to higher production volumes, lower costs, better computing performance, and reduced power consumption. And if you want the latest and greatest versions of these advantages, you'll have to order lithography machines from ASML until someone else comes up with similar solutions without trampling on this company's patents.

That puts ASML in the catbird seat these days, as chip manufacturers around the world race to build more and better production facilities. For example, Taiwan Semiconductor Manufacturing (TSM -0.34%), the largest third-party chip builder in the world, plans to spend $32 billion on infrastructure in 2023. Intel makes many of its own chip and has also started to sell manufacturing capacity to other chip designers recently, pouring $21 billion into infrastructure this year and a similar amount in 2024.

So the demand for ASML's goods is at an all-time high as everyone and their uncle is trying to build their way out of the multi-year chip-making capacity shortage. Funny enough, the same shortage situation also limits ASML's actual sales. The company is selling lithography systems as fast as it can build them, but that requires specialized chips. Those processors are in short supply.

ASML's share price crashed in the first half of 2022, along with every other fast-growing technology stock. The stock has mounted a comeback recently, posting a 64% gain in the last three months, but still trades 11% lower on a year-over-year basis. ASML shares aren't cheap at 44 times trailing earnings and 12 times sales, but remember, supply side issues limit the financial results. Thanks to the ongoing buildout of chip-making facilities, the semiconductor shortage has started to lighten. This ticker should look a lot more affordable once ASML's revenue-generating operations get back to full speed.

With a focus on ASML's highly valuable market leadership and strong potential for future growth, you should set aside the temporarily lofty valuation are grab a few shares before they race much higher. I'm convinced they will do so as the shortages evaporate, perhaps as soon as the second half of 2023.

Rambus is untouchable (and that's not a compliment)

And then there's Rambus (RMBS 0.14%). This is the chip stock your mother told you to stay away from.

You probably weren't thinking about buying Rambus shares anyway, judging by the stock's small market cap and limited trading volume. Still, you might be enthralled by the company's recent revenue growth and occasionally positive earnings. Before you hit that "buy" button, I'll show you why I don't recommend Rambus stock.

And I'm concerned that Rambus's shiny revenue growth looks hollow. The technology royalty and licensing sales that have always been this company's mainstay revenue stream are now fading over time. Direct sales of memory interface chips saw 60% year-over-year sales growth in the most recent quarterly report, but the cost of making those processors increased by 67%. Furthermore, demand for these products is highly unpredictable and could very well plunge at a moment's notice. And then Rambus is back to flat growth and negative bottom-line results, like the dry spell from 2017 to 2021.

Perhaps worst of all, this company has an unfortunate habit of delivering financial results far below expectations. The designer of high-speed computer memory interfaces missed Wall Street's earnings target in each of the last three reports and hasn't met a quarterly revenue estimate since 2020. "Overpromise and underdeliver" doesn't strike me as a great long-term strategy.

So I think you're much better off investing in Intel's well-managed recovery effort or ASML's jam-packed order book. Buying Rambus today will probably not make money for you in the long run.