When it comes to picking stocks to hold for the long term, it's wise to focus first on the underlying business. To earn your investment, a company should be able to display a strong track record of growth, possess a durable competitive moat, and enjoy tailwinds that can assure investors of its continued prosperity.

And while it's true that COVID-19 has upended many formerly solid business models, it has also strengthened plenty of incumbents that were in positions to successfully navigate the shifting environment. In particular, the digitalization, social media, and e-commerce trends were accelerated by the pandemic.

But regardless of the path the economy takes as the country looks ahead, those trends are here to stay, and these three companies are well-positioned to take advantage of them -- which is why they are good candidates to hold in your portfolio for the next decade or longer.

Working women managing apparel online store

Image source: Getty Images.

Facebook

Facebook (META -4.13%) remains a central social media platform operator for millennials, Gen Xers, and baby boomers alike -- even if they don't all favor the same apps. The company also operates WhatsApp and Instagram, and it's an advertising behemoth. That dominance in the digital ad space should continue for the foreseeable future as no other social media platform comes close to having its reach and recognition.

The company continues to post impressive numbers. Second-quarter revenue came in 56% higher than the same period last year, while operating profit more than doubled to $12.4 billion. Net income soared by 101% year over year to $10.4 billion. Daily and monthly average user counts were up 6.9% and 7.2%, respectively.

Facebook is not resting on its laurels, though. CEO Mark Zuckerberg said on the company's latest conference call that it's investing heavily in building what it expects will become the next big computing platform, which it calls "the metaverse" -- a virtual environment where people will be able to hang out and play games with friends, as well as do things that we cannot imagine doing on the internet today. More details about those plans will be unveiled in the coming months, but it's clear the company is taking steps aimed at further cementing its position in the industry.

Shopify

The pandemic has pushed many business owners to expand their retail operations into the online arena, and Shopify (SHOP 0.23%) provides a platform that makes this transition seamless and convenient. The company provides entrepreneurs and large enterprises with the tools to build and grow their e-commerce businesses, earning a cut of the transactions in the process.

With consumer spending on the rise, Shopify continued to report strong growth. In the second quarter, its revenue climbed by 57% year over year to $1.1 billion. As more merchants joined its platform, subscription solutions revenue surged by 70% year over year. Monthly recurring revenue and gross merchandise value also continued their ascents, rising 67% and 40%, respectively.

As the U.S. economy transitions to a hybrid workforce, Shopify will continue to remain relevant for many years as more people explore the benefits of working from home and running their small businesses. The company has continued to improve its platform by introducing customizable storefronts and allowing faster and more scalable checkout. President Harley Finkelstein also revealed on the earnings conference call that more merchants on standard plans upgraded to the company's premium plan, Shopify Plus, last quarter, and that the company also on-boarded international brands such as streaming giant Netflix (NFLX -9.09%) and global fashion company Aldo.

Etsy

If you're searching for a handmade or vintage gift for a loved one, Etsy's (ETSY -0.86%) platform will leave you spoiled for choice. The e-commerce company prides itself on having a large selection of unique items that offer a personal touch. Etsy also offers influencer collections that drive strong engagement and lead to repeat purchases, a winning formula that attracts more traffic to its site, which in turn attracts more sellers, creating a virtuous cycle.

The numbers demonstrate that its strategy works. In the first quarter, Etsy's gross merchandise sales more than doubled year over year to $3.1 billion. Revenue rose by 141.5% to $550.7 million while net income jumped 11-fold to $143.8 million. Both the numbers of active buyers and sellers saw healthy growth as Etsy worked on enhancing the platform's search function.

The company recently announced two back-to-back acquisitions to increase its range of products and penetrate new regions. It paid $1.6 billion for Depop, a marketplace for unique fashion. That deal provides it with access to a younger customer base that's into secondhand fashion. And its purchase of Elo7, one of the top 10 e-commerce sites in Brazil, gives it a foothold in the South American market. With these moves, investors can bet that Etsy can continue to post healthy growth in the years ahead.