If you've been anxiously watching the market madness of recent months wondering whether it could be foreshadowing another downturn, you're certainly not alone in that assessment. Many stocks are trading increasingly expensive, with valuations that simply aren't justified by their rates of earnings growth.

At the same time, viable stock buys across a range of sectors are still ripe for the picking. If you're trying to optimize your portfolio for maximum resilience and growth in the next market crash, you don't have to look far to find high-quality stocks that are up to the task.

If you have a few thousand dollars to put toward your investment portfolio, here are two top growth stocks to buy with excellent financial track records and strong competitive advantages that can fuel long-term portfolio gains in all types of market scenarios.

Couple standing on deck of beautiful yacht sailing on crystal blue waters.

Image source: Getty Images.

1. Pfizer

Pharmaceutical giant Pfizer (PFE 1.00%) has continued to enrich investors throughout the ups and downs of the pandemic stock market with steady share price gains and its dividend payout. Year to date, the stock is up nearly 10%.

Pfizer hasn't historically been a stock to register lightning-fast share price gains, but rather gradual increases. This can lend stable growth to a portfolio, but it's also one reason why its above-average dividend yield is so appealing. Currently, the stock yields 3.9%, way above that of the average stock trading on the S&P 500 (2%).

After more than 170 years in business, Pfizer boasts a wide-ranging lineup of products across a host of therapeutic areas, from immunology to rare diseases to oncology, that continue to stimulate meaningful balance sheet gains. With the addition of Pfizer's COVID-19 vaccine with its German partner BioNTech (which is now being marketed as Comirnaty), the company's top and bottom-line growth has spiked to record levels.

In the first quarter of 2021, both Pfizer's revenue and its net income surged by respective rates of 45% from the year-ago period. Comirnaty was clearly a major factor in this exceptional growth, as the vaccine generated $3.5 billion in revenue out of the company's total first-quarter revenue of $14.6 billion. In 2021 alone, Comirnaty is slated to bring in a whopping $26 billion in revenue, while Pfizer is projecting total full-year revenue in the ballpark of $70.5 billion to $72.5 billion.

That being said, Pfizer has plenty of other catalysts to rely on for long-term growth apart from the booming commercial triumph that has been Comirnaty. In the first quarter of 2021 alone, well-known blockbuster drugs Eliquis, Ibrance, and Vyndaqel/Vyndamax raked in respective revenues of $1.6 billion, $1.3 billion, and $453 million. And with the conclusion of Pfizer's merger of its generic drug unit Upjohn with Mylan to form Viatris last November, its balance sheet is no longer weighed down by the lagging growth this business had delivered in recent years.

As of 2020, Pfizer is one of the top pharmaceutical companies in the world by revenue, second only to Johnson & Johnson. Bear in mind, the pharmaceutical market achieved a global valuation of nearly $1.3 trillion last year, according to Statista.

Pfizer's strong brand authority, robust financials bolstered by an impressive assortment of top-selling products including Comirnaty, and its juicy dividend are all great reasons to buy this top healthcare stock. And if you need a few more, Pfizer's mouthwateringly low share price of around $40 coupled with the fact that it trades at just 4.8 times sales might just do the trick.

2. Shopify

If you want to invest in a sector with tons of durable, long-term growth potential, few industries can compete with the exponential rise of e-commerce. As the earlier days of the pandemic brought most of the world to a screeching halt, online shopping spiked to all-time highs. According to data from Digital Commerce 360, online spending in the U.S. alone shot up by 44% in 2020. A report by Statista also found that global retail e-commerce sales surpassed $4 trillion in 2020, and are expected to hit $5.4 trillion by next year.

Large-cap e-commerce stock Shopify (SHOP 1.26%) offers a prime example of the global surge in online shopping and the viable investment opportunities this demand creates. As the world turns increasingly toward convenient, digital solutions and away from many brick-and-mortar retailers, companies like Shopify that provide both the platform and tools necessary for online sellers to build thriving brands and businesses will reap the rewards of these consumer trends.

It's important to emphasize that Shopify had a strong track record of growth to its name long before the pandemic stimulated new bouts of additional tailwinds in the broader e-commerce industry. For example, in 2015, 2016, 2017, 2018, and 2019, Shopify's full-year revenue surged by respective amounts of 95%, 90%, 73%, 59%, and 47%. Its 2020 revenue growth of 86% was a continuation of this impressive streak.

The first quarter of 2021 also built upon this immense track record of balance sheet growth. During the three-month period, Shopify's total revenue shot up 110% from the year-ago quarter, bolstered by respective year-over-year growth of 71%, 137%, and 62% in subscription solutions revenue, merchant solutions revenue, and monthly recurring revenue.

And where Shopify had reported a net loss of more than $31 million in the year-ago quarter, its first-quarter 2021 net income totaled $1.3 billion, which management attributed to an "unrealized gain on our equity investment in Affirm as a result of its IPO in January 2021."

Beyond its balance sheet, Shopify has seen its share price skyrocket by about 56% over the past 12 months alone. The stock is also up by an eye-popping 32% year to date.

Even with its current sky-high valuation, analysts still think Shopify has plenty of upside potential left to capitalize on. They think that the stock could achieve a high price target of $3,300, which is about 128% higher than where Shopify is trading right now. If you're on the hunt for a golden egg to add to your basket in 2021 that you can hold for many years to come, Shopify is an unstoppable stock to consider.