The stock market has produced considerable returns for many investors over the years, and it's never too early or too late to plan for a better financial future. The types of stocks you buy and even your risk tolerance may change throughout your investing journey, but it's always a good time to hold quality businesses that are poised to deliver long-term meaningful growth.

Whether you're a new or experienced investor, you don't want to overlook the following two names as you construct your basket of winning stocks.

1. Apple

Apple (AAPL -0.35%) stock has delivered a total return of roughly 350% over the trailing five years, thanks to its continued dividend increases and solid share-price performance. To give you an idea of just how fantastic that number is, the S&P 500 has delivered a total return of 100% in that same time frame.

Economic headwinds come and go. While there's no denying that shifts in consumer spending are impacting most growth-oriented businesses -- and tech giants are no exception -- Apple continues to maintain a significant moat. Its smartphone business is the leading driver of this moat and continued growth. This is despite recent weakness in sales of some other hardware products, as well as a slowdown in sales in its third-largest market, China, due to increased competition in the region.

Smartphone sales accounted for $70 billion of Apple's total net sales of $120 billion in the first quarter of its fiscal 2024, which the company reported on Feb. 1. The other major needle-mover for Apple right now is its services segment, which revolves around its collection of subscription-based offerings. Services net sales totaled $23 billion for the quarter, a noteworthy 11% bump from one year ago.

Apple doesn't individually report advertising sales -- they're included in its overall services segment. However, the company's advertising potential across its family of apps and through the App Store is a still heavily untapped secret weapon. According to a study by Statista, advertising sales could bring in over $6 billion in revenue for the company in 2024 alone, which is still a fraction of its overall revenue but far from insignificant.

The growing balance between the asset-heavy and asset-light components of Apple's business and the fact that subscription-related sales are growing at such a rapid clip is noteworthy. Services segment sales were about three times higher than either Mac or iPad sales in the recent quarter. While consumers may be more hesitant to shell out hundreds or thousands of dollars to purchase a brand-new iPad or Mac right now, paying an additional subscription fee for music, news, or streaming entertainment is a more palatable expense.

Apple may be one of the most well-known names in tech, and its history of innovation and continued expansion in all market environments has made it a mainstay for many investors. The company is also well-positioned for near-term bumps in the road with $173 billion in cash and investments on hand. This stock looks like a worthy addition to any well-diversified portfolio in 2024 and beyond.

2. Amazon

Amazon (AMZN 3.43%) has had to contend with a difficult environment in the last few years, but its focus on operational efficiency and profitability is paying off. The full-year 2023 was fantastic for the business on multiple fronts. It saw robust earnings and cash flow, as well as favorable growth across its core businesses.

In 2023, net sales jumped 12% year over year to $575 billion, while net income reversed from a net loss of $2.7 billion in 2022 to a whopping gain of $30 billion of net income. Looking back beyond year-over-year comparisons, Amazon's net sales and net income in 2023 represented respective growth rates of 105% and 150% from 2019.

Right now, the company's cloud segment, Amazon Web Services (AWS), is the most notable driver of profitability. Of Amazon's total operating income of $37 billion in 2023, $25 billion was derived from AWS. Trailing-12-month operating cash flow rose 82% to $85 billion, while free cash flow for that period hit $37 billion.

Concerns about discretionary consumer spending remain front and center. Amazon reported that customers purchased over 1 billion products on its e-commerce platform from its deal-driven Black Friday and Cyber Monday events. Millions of new customers added Prime memberships to their accounts in 2023. And customers bought more goods on Amazon in the 2023 holiday season than any previous year on record.

Online-store sales contributed $232 billion to Amazon's net sales total for full-year 2023, while fees derived from third-party seller services added $140 billion to the top line. E-commerce is still the largest driver of top-line growth for Amazon, followed by AWS, advertising services, and subscription-based services.

Amazon is incorporating artificial intelligence (AI) solutions into many of its properties, from improving product listings on its flagship e-commerce platform to driving better advertising decisions to its AWS offerings. For example, Mitsubishi UFJ Financial Group, Inc. signed a multiyear agreement with AWS, part of which will involve deploying generative AI application builder Amazon Bedrock across over 100 new-use cases for its financial services business. Similarly, biopharmaceutical giant Amgen plans to build upon its existing partnership with the company and use Amazon SageMaker, a cloud-based machine-learning platform, to streamline the drug development process.

There's a lot to like about Amazon's flagship and newer streams of business growth. Investors might find that it's an opportune time to capitalize on that long-term potential before shares move higher.