Investors might still be waiting for a prolonged bull market, but that doesn't mean it's a bad time to buy tech stocks or that you should stick to the sidelines. If you have cash to invest -- money that you don't need for bills or other near-term financial commitments -- there are plenty of intriguing companies that look ripe for the picking.

Stock prices remain volatile across a range of sectors. It's important to look beyond price and at the underlying business before you press the buy button, to make sure that the company fits with your basket of investments as well as your preferred risk profile.

On that note, here are two stocks to consider adding to your buy list that could make you richer in 2024 and well beyond.

1. Shopify

Shopify (SHOP 1.11%) has processed $812 billion in global commerce since its inception, but this business still has a tremendous runway to explore within the multitrillion-dollar e-commerce space.

As one of the leading companies providing the software, hardware, tools, and solutions that merchants need to start, scale, and build businesses both online and offline across a range of industries, the need for Shopify's family of platforms isn't easing.

Over the last few years, growth has slowed considerably from where it was in the early days of the pandemic. Realistically, that was to be expected. Investors who scooped up shares of Shopify in those pandemic days and held on to them through the period that followed likely experienced some significant gains followed by bearish volatility.

However, for the long-term investor, what matters is whether it's a business that can sustain meaningful growth over a period of years, rather than a few quarters of unbelievable gains that would be hard to replicate over a prolonged time.

Despite the fluctuations in consumer spending and the broader economy that is still posing difficulty for businesses like Shopify's, this e-commerce giant is harvesting cash, profits are growing, and revenue is steadily on the upswing.

In the first nine months of 2023, the company brought in revenue of nearly $5 billion, a 27% increase from the same period in 2023. It was not profitable when looking at that nine-month period, but in the third quarter, it did turn back to profitability of $718 million under generally accepted accounting principles (GAAP). Shopify reported cash from operating activities of approximately $500 million in the first three quarters of 2023.

That nine-month period also saw Shopify bring in total free cash flow of about $460 million. From mom-and-pop shops to large brands, the uses for its products and services are only growing. Still, the company estimates that it has only penetrated about 10% of U.S. e-commerce. That's a growth story that long-term investors might want to capitalize on now and in the years to come.

2. Apple

Apple (AAPL -0.35%) is one of the most talked-about stocks, but the value case for this investment has continued to grow and expand through the years.

With market-leading hardware products and a growing collection of subscription-based services that now account for the second-largest slice of its revenue and profits, Apple has proven it can innovate through economic thick and thin while rewarding investors in the process.

As a long-term investor, you should be looking at any business with a minimum holding period of five years, preferably longer. So, let's look at how Apple has performed over the trailing-five-year period.

Over that time, annual revenue has grown by about 50%, while net income has grown about 76%. Even though its 0.5% yield is considerably less than the average stock trading on the S&P 500 (where it's around 2%), that dividend has increased by 163% over the past five years. In total, the stock has delivered a return of 350% in that time frame.

Even though consumer spending is still in flux, iPhone sales -- which still account for the largest portion of Apple's top and bottom lines -- reached a new record in the most recent quarter, which included the new iPhone 15. The company also just released its first carbon-neutral Apple Watch.

The company is slowly but surely balancing out its reliance on sales of hardware products with recurring sales of its services like Apple TV+, Apple Music, and Apple News+. Of its total revenue of close to $90 billion in the most recent quarter, $44 billion was derived from iPhone sales and $22 billion came from its services segment.

This is a business you can buy and add to again and again through the years, which is no small feat in any market environment.