After a tumultuous year for investors where the Nasdaq-100 technology index declined by 33%, the primary pitfall of short-term investing was made clear: It's almost impossible to predict what the stock market will do tomorrow, next month, or in the next year.

One thing we do know: Since 1986, the Nasdaq-100 has been positive in 29 of the 37 years, or 78% of the time. It has delivered a total return of 4,244% over that period, which would've turned a $10,000 investment into more than $420,000. 

The lesson is to focus on the long run and buy shares in companies with sound business models generating healthy growth, and with plenty of future potential to maintain that growth. Here are two great examples of stocks to buy now, no matter what the broader market does in 2023. 

1. Uber's core business just roared back to life

If you live in a big city, you've probably used one of Uber Technologies' (UBER 0.69%) services. It originally set out to disrupt the taxicab industry with its ride-hailing (mobility) platform and has expanded into food delivery through Uber Eats and into freight delivery through Uber Freight. Based on the company's financial results, all three segments have been successful.

Uber's mobility business suffered during the pandemic as society ground to a halt, decimating the company's primary revenue generator. Uber Eats picked up the slack and became the headline growth driver during that tough time, but now that life has mostly returned to normal, mobility has come roaring back, while food delivery has taken a back seat. That's the benefit of having diverse revenue streams.

In the third quarter of 2022, bookings in Uber's mobility segment grew by 45% year over year to $13.7 billion. That growth was triple the pace of the company's food delivery business, which grew bookings by just 13%. By 2028, the mobility industry could be worth $534 billion compared to $388 billion for food delivery, so it's a much larger opportunity, and it's encouraging to see the segment bouncing back for Uber.

Then there's Uber Freight, an up-and-coming part of the business that saw a whopping 336% increase in revenue in Q3. It has already become one of the world's largest logistics platforms, with more than 200,000 users and $17 billion in freight under management. 

Overall, 124 million people engage with Uber across its various services on a monthly basis. 

The company's stock is down 58% from its all-time high, but that might be a good thing for patient investors because Uber could be staring at $1 trillion in opportunities across its three business units by the end of this decade. That's why it's a great buy this year, no matter what the stock market does

2. Tenable leads a critical industry

In the modern age, businesses need the internet to operate, and a technology known as cloud computing enables that digital transformation. While it makes life more convenient for all stakeholders, it also means exposure to cybersecurity threats. Attackers are constantly growing more sophisticated, and they can be located anywhere in the world, so businesses need around-the-clock, proactive security.

Enter Tenable (TENB 0.76%).

Threat detection and vulnerability management are types of proactive solutions that scan networks for potential risks, whether it's a weak point in the security architecture or a bad actor lurking in the shadows waiting to strike. Tenable's Nessus platform is the leading vulnerability management tool -- it's ranked No. 1 in adoption, accuracy, and coverage, protecting against more common vulnerabilities and exposures (CVEs) than any of its competitors. 

Nessus is an on-ramp to Tenable's more expensive, industry-specific enterprise solutions, or its products based on certain needs like cloud management, or attack surface management. Plus, the company launched Tenable One in 2022, which combines a handful of its most successful tools to give businesses a comprehensive, all-in-one solution. 

Over 40,000 organizations have deployed Tenable in some way, but there's a subset of high-spending customers growing very quickly. As of the recent third quarter (ended Sept. 30), there were 1,280 businesses spending at least $100,000 or more with Tenable on an annual basis. That number has more than tripled from 387 just four years ago. 

Tenable estimates its addressable opportunity will top $25 billion per year by 2025, and considering its annual revenue should come in at $679 million once its 2022 results are official, the company still has a very long runway.