If you're new to investing, the market may not look too inviting. All three major indexes touched bear territory last year. And, after a rally in January, they're back to declines -- each slipping in the month of February.

But now actually is the perfect time to get started on investing. Many top stocks have reached dirt cheap valuations. At the same time, their long-term prospects remain strong. This means you can buy quality companies today at a bargain and benefit from growth over the long term. And speaking of growth, growth stocks offer many such opportunities. Let's check out two great ones to buy.

1. Amazon

Amazon (AMZN 0.80%) is a leader in two high-growth businesses: e-commerce and cloud computing. These markets are set to grow in the double digits this decade. Amazon has already demonstrated it can increase earnings over time thanks to these businesses.

AMZN Net Income (Annual) Chart

AMZN Net Income (Annual) data by YCharts.

In recent times, a few things have weighed on Amazon, though. The company recorded billion-dollar valuation losses from its investment in Rivian Automotive shares. Amazon also has dealt with excess capacity after doubling its fulfillment network over the past two years. Finally, higher inflation has hurt costs -- and shoppers' wallets.

The good news is these challenges are temporary, and Amazon has the strength to manage these tough times and win over the long run. Today, Amazon is improving its cost structure, a move that should help it excel in the near term and once the overall environment improves, too. The company continues to grow its Prime program membership. And even though cloud-computing customers are spending less right now, they're still sticking with Amazon Web Services (AWS).

In spite of today's difficulties, Amazon's total revenue continues to grow. Net sales advanced 9% in the fourth quarter to $149.2 billion. And AWS sales climbed in the double digits in the quarter.

Today, Amazon shares are trading close to their lowest in relation to sales since 2015. This is a huge opportunity to get in on a company that should dominate in e-commerce and cloud computing over the long term. And, once the general economic environment improves, this dominance should pay off for shareholders.

2. Moderna

Moderna (MRNA 0.66%) is known for its COVID-19 vaccine. And for good reason. It's the company's first product and has generated billions in earnings. While this attracted investors a couple of years ago, today it's pushed some away. Some worry Moderna's days of big revenue are over.

But Moderna is actually a great long-term pick, and its story is just getting started. Of course, Moderna may not launch a second product that will generate more than $18 billion in sales like the vaccine did last year. But the company has what it takes to bring in major revenue through a variety of potential products. And that actually is a lot less risky than depending on only one product.

Right now, Moderna has 38 candidates involved in clinical trials. And outside of the coronavirus program, three are in phase 3 studies: vaccine candidates for flu, respiratory syncytial virus (RSV), and cytomegalovirus (CMV).

The company plans to request regulatory approval for the RSV candidate in the first half of 2023. The goal is to launch an RSV vaccine early next year. If all goes well in flu and CMV trials, launches there may not be far behind. More good news: Each of these candidates represents a blockbuster revenue opportunity.

So, progressively, we can see how Moderna may grow into a major biotech player beyond the coronavirus portfolio. This doesn't mean coronavirus vaccine revenue is over. As people go for booster shots, vaccine revenue should remain in blockbuster territory.

Moderna's shares could climb more than 60% in the coming 12 months, according to Wall Street's average forecast. But even if this doesn't happen, that's OK. More importantly, the company has what it takes to grow earnings and share performance over the long haul.