The tech sector generated robust gains for investors in 2020 as more people used digital services to work, learn, shop, play, and stay in touch during the pandemic. A retreat from other pandemic-stricken sectors accelerated that shift and turned many tech stocks into defensive plays.

So far, 2021 has been more challenging for many of those tech darlings. Rising vaccination rates are causing investors to shift from pandemic plays to reopening plays, while rising bond yields are sparking a rotation from growth stocks to value stocks.

As a result, the tech-heavy Nasdaq stumbled in the second half of February and the first week of March. That decline spooked many investors who had grown accustomed to the Nasdaq's ongoing gains, creating some buying opportunities among these now-discounted companies. During the dip, I took advantage of the situation to accumulate more shares of four promising tech stocks: Bumble (BMBL 1.05%), Pinterest (PINS -0.64%), salesforce.com (CRM -1.10%), and ASML Holding (ASML 1.14%). Let's find out a bit more about these companies.

Declining stock price charts against a red background.

Image source: Getty Images.

1. Bumble

Last December, I identified Bumble as my top IPO stock to buy in 2021. But when the female-oriented online dating company finally went public a few days before Valentine's Day, it came in too hot.

Bumble priced its IPO at $43 a share, but the stock opened at $76 before closing at $70.31 a share on the first day. But during the tech sell-off, I accumulated most of my shares below $60 -- which turned out to be a good move, since Bumble's stock surged after it posted an impressive fourth-quarter report on March 10.

Bumble's total number of paid users grew 32% year over year in the fourth quarter, and it expects its revenue to rise 32%-34% in fiscal 2021. Based on that estimate, Bumble actually seems cheap at 12 times this year's sales, since many tech stocks generating comparable revenue growth are still trading at much higher price-to-sales ratios.

2. Pinterest

Pinterest carved out a high-growth niche in the social media market with its virtual pinboards, which let users pin photos and videos to share their ideas, interests, and hobbies with other users.

Pinterest's mellow approach insulates it from the hate speech and misinformation controversies plaguing Facebook and Twitter. It's also a natural fit for online shopping, and many retailers have uploaded their entire catalogs to Pinterest through shoppable pins.

Pinterest's iPad app.

Image source: Pinterest.

Pinterest posted strong growth among Gen Z and millennial users last year, and it expanded beyond its core female audience and gained more male users who turned to its pinboards for stay-at-home ideas.

Those tailwinds boosted Pinterest's revenue 48% in 2020, and its monthly active users (MAUs) increased 37% to 459 million. Analysts expect its revenue to rise another 48% this year and for its adjusted earnings to more than double -- which suggests it's still a solid post-pandemic play.

I missed Pinterest's explosive rally last year, but the stock still looks reasonably valued at less than 60 times forward earnings and 18 times this year's sales. That's why I didn't hesitate to buy some shares when Pinterest's stock retreated from its all-time highs.

3. Salesforce

Salesforce, the largest provider of cloud-based CRM (customer relationship management) services in the world, helps big companies remotely maintain customer relationships. It complements that core platform with other cloud-based services for sales, marketing, and analytics purposes.

Salesforce's revenue rose 24% to $21.3 billion in fiscal 2021, which ended this January, and it plans to more than double that figure to over $50 billion by fiscal 2026, which implies its revenue will grow at a compound annual growth rate of 19% between 2021 to 2026. That's a rosy long-term forecast for a stock that trades at about 50 times forward earnings and less than eight times this year's sales.

Salesforce will keep growing because its services help companies streamline their businesses, crunch data more effectively, and reduce their dependence on human employees -- which are all secular trends that will persist for the foreseeable future. Therefore, it was an easy choice to add more shares of Salesforce during its latest pullback.

4. ASML

Last but not least, I accumulated more shares of ASML during the sell-off. ASML might not be a familiar name to many investors, but the Dutch company is the world's largest producer of EUV (extreme ultraviolet) systems.

The world's three most advanced chip foundries -- Taiwan Semiconductor Manufacturing, Samsung, and Intel -- all use ASML's EUV systems, which were developed over the past two decades, to print circuit patterns on their wafers.

These foundries can't produce their smallest 5nm and 7nm chips without ASML's EUV systems. Simply put, ASML is a gatekeeper for the expanding semiconductor industry, and it will profit from the incoming "super cycle" of chip upgrades across the 5G, cloud, AI, and driverless vehicle markets.

Wall Street expects ASML's revenue and earnings to rise 32% and 39%, respectively, this year. The stock still looks reasonably valued relative to those growth rates at just under 40 times forward earnings, and it could have plenty of room to run over the next few years.