If you can buy great businesses and hold them for the long term, you can create enormous wealth in the stock market. The key, of course, is knowing which stocks to buy -- and when.

To help you in this regard, here are five outstanding stocks that could make you rich in the coming years.

Stacks of gold coins surrounding a bag with a money sign on it.

These stocks could make you a fortune. Image source: Getty Images.

1. Shopify 

The coronavirus pandemic will have a lasting effect on global commerce. Much of the traditional retail industry -- which was already in decline before the COVID-19 crisis -- could be washed away if fears of getting sick keep consumers out of stores. Shopify (NYSE:SHOP) is helping businesses adapt to these challenging times. The commerce platform gives small businesses the tools they need to build e-commerce stores and compete in an increasingly online world. Shopify's software is so good that larger businesses are also flocking to its platform, giving it -- and its investors -- more ways to win in the years ahead.

2. Amazon

Like Shopify, Amazon.com (NASDAQ:AMZN) stands to profit handsomely from the relentless growth of e-commerce around the world. Global retail e-commerce sales will grow to $6.5 trillion by 2023, up from $3.5 trillion in 2019, according to Statista. That leaves plenty of growth ahead for the mighty Amazon, which generated approximately $245 billion in e-commerce-related sales in 2019. Amazon is also the global leader in cloud infrastructure services, which is another large and rapidly growing market that should fuel the online juggernaut's growth in the coming decade.

3. Alibaba

China is one of the few areas of the world where Amazon does not dominate e-commerce. The world's most populous country -- and its fast-growing online retail market -- is Alibaba's (NYSE:BABA) dominion. Alibaba is an economy onto itself, with nearly one billion users across its e-commerce marketplaces and digital payment services. With goals that include facilitating 10 trillion yuan ($1.4 trillion) in gross merchandise sales on its platform by fiscal 2024 and serving two billion customers by 2036, Alibaba will be a force to be reckoned with over the next decade and beyond.

4. Visa

Along with e-commerce, the COVID-19 pandemic is also likely to accelerate the global trend away from cash and toward digital forms of payment. Fears of disease transmission might make people hesitant to touch and exchange cash, and many will instead choose to use contactless payment options. This, combined with the growth of online retail sales, should fuel a steady rise in digital payment usage over the next decade. Visa (NYSE:V), which operates the largest digital payments network in the world, stands to benefit from these trends perhaps more than any other company.

5. Salesforce

The digital transformation megatrend is also likely to be accelerated by COVID-19. After suffering through forced office closures during the coronavirus crisis, businesses will be even more motivated to transition their operations to the cloud. Cloud software is easier to distribute to remote workforces. It's also easier to update and secure. And no one does cloud software quite as well as Salesforce.com (NYSE:CRM). The cloud computing pioneer helped usher in the cloud trend a decade ago. And with its cutting-edge technology in increasingly vital areas -- such as data integration, analytics, and AI -- Salesforce is well-positioned to lead the industry forward well into the next decade.