There is no magic bullet for building wealth through the stock market. And anyone who says you can experience life-changing returns overnight is not being realistic.

The good news is that you don't need a magic formula or to find that hidden gem of a stock to build a portfolio that stands the test of time and helps you meet your long-term retirement goals. You can invest in great companies, consistently adding to your portfolio, trimming your stocks when the thesis changes, and building larger positions in your winners with time.

If you have $1,000 to put into stocks as 2024 starts, there are plenty of fantastic stocks begging to be bought. Here are two no-brainer names to consider for your buy list.

1. Amazon

Amazon (AMZN 3.43%) has come a long way in the last three decades since Jeff Bezos started an online business selling books from his garage. Fast forward to today, and Amazon controls a wide-ranging family of businesses and income streams, including one of the world's largest e-commerce platforms, the world's largest cloud infrastructure business, subscription services, advertising services, and more.

Like many growth-oriented stocks, Amazon had some bumpy quarters in the turbulent macro landscape brought about by the steep economic headwinds of the pandemic. This meant that management undertook aggressive measures to cut costs and return to sustained profitability, including a series of widely reported layoffs.

These difficult operating decisions have paid off, and while individual and enterprise customer spending is still in flux, Amazon appears to be winning in a tough environment. The company released its results for the fourth quarter and full year 2023 on Feb. 1, promptly giving shares a nice single-digit boost that day. Shares are up by approximately 41% over the trailing 12 months. The S&P 500 has delivered a gain of less than half that amount in the same period.

In 2023, Amazon pulled in total net sales of $575 billion, up 12% from 2022, and net income of $30 billion. That bottom line figure was a noticeable improvement from the $2.7 billion net loss it reported in 2022. Operating income for the 12-month period totaled $37 billion, and $25 billion, or roughly 70% of that amount, was entirely attributable to the cloud computing segment Amazon Web Services (AWS). Free cash flow for 2023 came in at around $37 billion.

E-commerce sales (which include online store sales and third-party seller services as reported on Amazon's financials) totaled $372 billion for 2023, remaining the largest driver of net sales for the company. Amazon delivered packages to Prime members at record speeds in 2023, with over 7 billion units being distributed via next-day or same-day delivery. An increasingly notable source of growth for Amazon apart from its e-commerce and cloud computing segments is its advertising business, which raked in net sales of $47 billion in the 12-month period.

Amazon is steadily expanding the healthcare wing of its business, and one recent change is that Prime members in the U.S. can incorporate One Medical's primary care services into their existing subscription for just $9 a month. Prime members who go this route can save up to $100 for a One Medical membership compared to what they would pay for a stand-alone subscription.

Most investors who stay with a stock for years will encounter some rough patches -- even when the company boasts market-leading businesses. But waiting through these periods is often well worth it. This certainly appears to be the case with Amazon. Long-term investors may want to take the opportunity to capitalize on the continued growth opportunity this business presents.

2. Pinterest

Pinterest (PINS 4.04%) is known for its eye-catching platform of images and videos that allow users to search for inspiration on just about any topic of their choosing. Because users are already on Pinterest for free with the intent to look for a specific topic or idea, this creates an environment ripe for integrating appealing ads along with the regular images and videos (known as "pins") that appear in any given set of search results.

Pinterest makes money from placing ads on its website and app for various brands ranging from smaller businesses to large, household name entities. The company's platform is ideal for ad spending by businesses and is one of the most-visited websites online today. According to Statista, Pinterest had 1.6 billion visits from its global user base last year. As of the last quarterly report, Pinterest had 482 million monthly active users. That figure represents an increase of about 50% from the company's monthly active user base in the third quarter of 2019, just a few months after Pinterest's public debut in April 2019.

In the third-quarter earnings call, CEO Bill Ready noted that Gen Z users remain the fastest-growing and most engaged group on its platform. Newer users of Pinterest are also saving twice the amount of content in their first 12 months on the platform than older cohorts of users.

While many of the "pins" on Pinterest are shoppable, meaning that these are actually well-placed ads that link to a product or service, management intends to make all "pins" shoppable in the future. Pinterest is actively working on transitioning lower-funnel revenue to direct links, meaning that a single click on a "pin" would bring the user directly to the merchant's purchase page on their website.

As of the third quarter of 2023, these recent changes drove 88% higher outbound click-through rates (more users are clicking after viewing an advertisement) and a 39% decrease in cost per outbound click (merchants are paying fewer advertising dollars for more clicks on links that take users straight to their website).

Another newly launched initiative is Pinterest's mobile deep-linking advertising product. Mobile deep links direct users from a "pin" on Pinterest to the merchant's mobile app checkout or product page or to the relevant page through the Pinterest app if the user does not have that merchant's specific app downloaded. While still in early deployment, merchants who have chosen mobile deep links on Pinterest as part of their advertising strategy have seen conversion rates soar by 235%, while cost per action (the cost to achieve an intended consumer action) declined by 35%.

In the third quarter of 2023, Pinterest's revenue grew 11% overall to $763 million, driven by 8% revenue growth in the U.S. and Canada, 33% revenue growth in Europe, and 29% revenue growth in the rest of the world compared to the prior-year period. Pinterest has work to do to get back to consistent profitability although it did report net income of $7 million in the quarter.

The digital advertising space is a competitive one, and the ongoing volatility in ad spend could continue to impact this industry in the coming quarters. Still, Pinterest is growing its user base, which translates to more potential buyers of the products and services from merchants who pay to advertise on the platform while demonstrating the effectiveness of its ad capabilities. Even owning a small slice of this business could be a worthwhile endeavor in the long run.