The stock market sell-off of 2022 has brought some high-flying names to their knees this year as investors have been panicking over macro events such as the Russia-Ukraine war, surging inflation, the possibility of a recession, and higher interest rates that make equities a less enticing option to invest in.

However, investors shouldn't forget that the stock market has generated solid returns over the past decade despite the fact that the market's returns can vary significantly from one year to another. As such, investors who buy and hold stocks over longer periods are likely to see wealth-building returns. This is the reason why the likes of Apple (AAPL 0.29%) and Twilio (TWLO 1.71%) look like solid long-term bets following their disappointing performances in 2022.

AAPL Chart

AAPL data by YCharts

Let's look at the reasons why investors should consider putting $1,000 in these potential growth stocks right now.

1. Apple

A $1,000 investment in Apple stock a decade ago would be worth nearly $12,000 right now, assuming dividends paid out by the tech giant were reinvested. The stock's impressive performance over the past 10 years can be attributed to the robust demand for its products as well as the growth of its services business, all of which have helped Apple log strong top- and bottom-line growth.

AAPL Revenue (TTM) Chart

AAPL Revenue (TTM) data by YCharts

The next decade could turn out to be more exciting for Apple investors. While the company's bread-and-butter product -- the iPhone -- is thriving in the 5G smartphone era and looks set to drive solid sales growth in the long run, the additional catalysts that could come into play could help accelerate Apple's growth substantially.

For instance, there's been a lot of chatter since late 2021 that Apple is reportedly developing a self-driving car that could hit the market as soon as 2025. That may look like an aggressive timeline, but the latest chatter indicates that Apple is well into the development of the operating system that will power its autonomous electric vehicle.

Of course, these are all rumors at this point, as Apple hasn't confirmed these developments officially. However, Apple's test fleet of 69 cars and regulatory filings indicate that the company may indeed be working on an autonomous electric vehicle, and entry into this market could supercharge its long-term growth. Katy Huberty of Morgan Stanley predicts that a car from Apple could help the company double its revenue and market capitalization.

And this isn't the only big market Apple is going after. The tech giant is expected to launch a mixed reality headset powered by augmented reality (AR) and virtual reality (VR) in early 2023 to tap into the metaverse. Such a move could unlock another huge opportunity for Apple to tap into. IDC estimates that the demand for AR/VR headsets is expected to take off, growing at an annual rate of 35% and hitting annual shipments of 50 million units by 2026.

All of this indicates that Apple could continue generating eye-popping returns for investors in the long run. That's why it would be a good idea to buy the stock right now, as it is trading at 28 times trailing earnings -- a discount to the Nasdaq-100's multiple of 32 -- but it could become too expensive to buy once it starts rallying.

Person looking at a candle chart on a smartphone.

Image source: Getty Images

2. Twilio

Cloud communications specialist Twilio went public in 2016. A $1,000 investment in shares of Twilio during its IPO would now be worth more than $6,000 despite the massive plunge in the company's stock price since the beginning of 2021.

Twilio stock has about 62% of its value since the beginning of 2021 despite clocking terrific growth quarter after quarter. The plunge can be attributed to the company's rich valuation, management's habit of guiding conservatively, and the fear that its growth would taper in a post-pandemic scenario. The company was a big winner during the coronavirus pandemic as the demand for cloud-based contact centers increased rapidly.

Twilio has sustained its momentum in a post-pandemic world, as the advantages of choosing a cloud-based contact center over physical call centers have kept the demand for its solutions strong. The company recorded 61% growth in 2021 to $2.84 billion. It expects revenue to increase 46% in the first quarter of 2022, while analysts expect the company to finish the year with 35% revenue growth.

What's more, Twilio is expected to clock outstanding growth once again in 2023, with revenue expected to increase nearly 30% to $5 billion and the company turning profitable on a non-GAAP basis. Such impressive growth isn't surprising, as Twilio commands a solid share of the fast-growing cloud communications market.

The cloud-based contact center market is expected to clock annual growth of nearly 23% through 2027 and hit a size of $56 billion, according to a third-party estimate. Twilio, therefore, is sitting on a tremendous opportunity, and it is in a terrific position to capitalize on it considering its 38% share of the cloud communications space.

All of this indicates that Twilio can maintain its rapid growth for a long time to come, which is why investors looking to put $1,000 into a cloud stock should consider capitalizing on its severe pullback. Twilio's price-to-sales ratio has come down to 8.9, which is a big discount compared to its five-year average sales multiple of 17. This gives investors a nice entry point into Twilio stock right now before it goes on a bull run.