Last year was hard for most investors as the S&P 500 fell more than 19%. But chin up: Historically, the stock market rarely has multiple consecutive down years. That doesn't guarantee prosperity in 2023, but it could make now a good time to start buying quality stocks that the broader market declines have pushed to bargain-basement prices.

And instead of going for the speculative junk like meme stocks, consider best-in-class technology titans like Amazon (AMZN -0.55%), Qualcomm (QCOM 2.16%), and ServiceNow (NOW 0.51%). Their proven track records and durable growth make them potentially great short- and long-term investments. Here's why three Motley Fool contributors recommend them.

Amazon's most profitable segment could fuel investor returns

Justin Pope (Amazon): The company's rise to become the largest e-commerce business in the United States made long-term shareholders rich. And its growing cloud business could drive investment returns for the next generation of investors.

Like e-commerce, Amazon's cloud business -- Amazon Web Services, or AWS -- has become the industry leader, with approximately 33% of the global cloud infrastructure market.

AWS offers various digital services, including web hosting and storage, computing power, and much more. The features run on Amazon's servers worldwide, delivering speed and connectivity to customers from the servers closest to them.

But the difference between e-commerce and AWS is how profitable they are. Amazon has made $17.6 billion in operating profit through nine months of 2022, and all of it has come from AWS, despite AWS revenue making up just $58.7 billion of Amazon's total $364.7 billion in sales. In other words, AWS is the golden goose that pays the bills.

Amazon's global presence should create growth opportunities over the long term. The head of AWS has stated his optimism in the past, claiming that AWS still has much room to grow because most of the world's IT hasn't moved to the cloud yet.

Even if the e-commerce side of the business weighs down Amazon's overall revenue growth, the high margins of AWS could potentially lift earnings growth as the more profitable segment becomes a more prominent part of the company.

AMZN PS Ratio Chart

AMZN PS ratio; data by YCharts.

That's important to keep in mind when you look at valuation. The stock currently trades at roughly half of the price-to-sales ratio it averaged over the past decade, but the profitability of those dollars should increase as AWS grows. Higher margins could justify a higher valuation.

Amazon is as strong as ever despite the slide in shares. Consider starting here if you're looking for stocks with both short- and long-term upside.

The chip stock that connects with customers and investors alike

Will Healy (Qualcomm): Given the state of Qualcomm, it might seem like a strange choice. Slowing consumer spending and a slowdown in the semiconductor industry have weighed on the stock during the tech bear market.

But cyclicality has long defined spending for consumer products and semiconductors, and Qualcomm has positioned itself to benefit from any recovery. The company is the leading producer of 5G smartphone chipsets, and the slump in consumer spending has slowed but not stopped the 5G upgrade cycle. This likely means that consumers will eventually upgrade despite the current slowdown.

Moreover, the company continues to prepare for the day when fewer communication functions occur on smartphones. To this end, it has pivoted into the Internet of Things and the automotive market. Its chips power the Oculus VR headsets manufactured by Meta Platforms.

And numerous automakers have taken an interest in the company's digital chassis. This will power a digital cockpit that supports automobile telematics as well as assisted and autonomous driving.

But despite that potential, investors have focused on a less optimistic near-term forecast. The company achieved 32% revenue growth in fiscal 2022 (ended Sept. 25), bringing in $44 billion. Still, that considerable growth has given way to a forecast for revenue declines in the handset market, the segment that accounted for two-thirds of Qualcomm's revenue in 2022. With that prediction and the bear market on stockholders' minds, the stock fell by more than 40% over the last year.

Nonetheless, Qualcomm's price-to-earnings ratio has fallen to just under 10. That valuation seems outrageously low, considering the company's dominance in chipsets and industry forecasts.

Lastly, Data Bridge Market Research forecasts a compound annual growth rate of 49% for the chipset industry through 2029. Such a prediction increases the likelihood that Qualcomm stock is a monster opportunity even if that forecast is overly optimistic.

ServiceNow has a resilient subscription model and attractive valuation 

Jake Lerch (ServiceNow): When you think of tech titans, ServiceNow might not be the first name that comes to mind. Yet with a market capitalization of $79 billion, this company is far from tiny. It's the 93rd largest American company by market cap, bigger than General Electric and slightly smaller than Citigroup.

ServiceNow designs enterprise software solutions -- the applications that help businesses manage workflow, perform analytics, and execute digital collaboration. Its products are used by more than 7,400 customers, including over 80% of Fortune 500 companies.

In its most recent quarter (ending Sept. 30), over 95% of sales came from subscription revenue. The company has a 98% renewal rate for its products, which gives investors confidence that revenue will stay strong, even if a recession comes in 2023.

Moreover, the company's valuation looks attractive. ServiceNow is at multiyear lows on a price-to-free-cash-flow basis. Its current level of 42.1 is more than 33% below its five-year average of 66.5.

NOW Price to Free Cash Flow Chart

NOW price to free cash flow; data by YCharts.

Wall Street remains bullish on ServiceNow. Of the 34 analysts with ratings on the stock, 30 rate it a buy or strong buy, and none rate it a sell. Analysts expect the company to generate $8.8 billion in revenue in 2023, up roughly 22% year over year.

If the company can achieve that sort of growth, potentially in the face of a recession, it will demonstrate the power of its business model. That means ServiceNow looks like a stock worth owning right now -- and for years to come.