Do you know the keys to succeed at investing in stocks? Time and patience, or buy and hold, if you will. That is, if you can buy strong-conviction stocks with unstoppable growth catalysts and hold them for several years, even decades, without paying heed to daily fluctuations in stock prices, you could build unfathomable wealth over the years. And the best time to start investing is now. So if you have extra $5,000 that you don't need in the considerable future, here are great three stocks to hold for the next 20 years, at least.

An unstoppable megatrend to bet on

In a year when the stock markets have hit record highs, Brookfield Renewable Partners (NYSE:BEP)(NYSE:BEPC) shares have hugely disappointed investors. I believe this is an excellent entry point for investors looking to bet on stocks worth owning for decades, simply because of Brookfield Renewable's foothold in an ever-growing industry -- renewable energy. With global economies striving to cut down on greenhouse gas emissions, the International Energy Agency projects renewable sources to account for one-third of the world's electricity by 2025, which means clean energy a potential trillion-dollar market in the making.

A happy senior couple.

Image source: Getty Images.

Brookfield Renewable is not only among the world's renewable-energy producers, but it's also well diversified, with strong presence in hydropower and a growing presence in solar and wind. So what is the company's growth potential? Consider that Brookfield Renewable has roughly 20 gigawatts (GW) of assets under operation currently across four continents, but its development pipeline was already worth 31 GW as of August.

Based on that pipeline and its efforts to boost margins, Brookfield Renewable expects to grow its funds from operations (FFO) per share to by 6%-11% organically through 2025. And if it can find lucrative acquisition opportunities along the way, the company could grow FFO by another 9%. So while that growth should reflect in the stock's price, dividend growth should act as a booster: Brookfield Renewable is committed to growing dividends by 5%-9% annually in the long run.

With Brookfield Renewable already yielding a strong 3.2% and the stock down sharply this year, you could lock in massive gains over the next 20 years by simply reinvesting dividends that Brookfield Renewable pays you and watching the world transition to clean energy.

This stock's an almost surefire long-term winner

Mastercard (NYSE:MA) is among the world's largest players in payment processing, and although competition is tough, Mastercard is aggressively augmenting its traditional business with new technologies, and that innovation and hunger for growth could mean big things for the company in the coming decades.

For instance, with cryptocurrency mania catching on, Mastercard knew it doesn't want to be left out, so it recently acquired CipherTrace, a cryptocurrency intelligence company whose platform helps customers, from financial institutions to regulators, to enhance security and monitor fraud. In another rumor floating in the market, Mastercard is reportedly planning to launch buy-now-pay-later in India, one of the company's key growth markets that still relies heavily on cash.

In short, Mastercard doesn't just facilitate payments made using its co-branded credit or debit cards anymore but is evolving into a larger fintech company that's constantly innovating to improve its offerings and make its platform more secure.

MA Chart

MA data by YCharts

Mastercard's shares have risen rapidly in value in recent years, but that's underpinned by steady growth in revenue and cash flows. Also, Mastercard generates a hefty operating margin north of 50%, and it has also started to pay out larger dividends to shareholders. Although its dividend yield is minuscule, Mastercard is a stock to invest in for growth. As economies around the globe increasingly move from cash to digital payments, Mastercard has everything at its disposal to make the most of the opportunity.

This stock may have just started in a trillion-dollar market

The Trade Desk (NASDAQ:TTD) is yet another stock that has had a pretty dismal year so far, but in a world that's increasingly going digital, The Trade Desk's cloud-based ad-buying platform could mint it boatloads of money in the coming years.

The Trade Desk's artificial-intelligence-driven programmatic platform automates ad buying with real-time analytics and allows clients to manage campaigns across various advertising formats and channels, such as display, audio, video, and social, across a variety of devices. Advertising agencies and service providers to advertisers are The Trade Desk's primary customers, and it earns fees from them based on their advertising spending, as well as some revenue from value-added and data services.

The Trade Desk's offering has found many takers: It has nearly 875 customers, including some of the world's largest advertising companies, including Publicis Groupe, WPP, and Omnicom.

Through the six months ended June 30, 2021, The Trade Desk's revenue grew 67% to nearly $500 million. To put its growth into perspective, consider that the company generated revenue worth $661 million in the full year 2019. Also, The Trade Desk is already profitable.

An even more important metric to gauge how The Trade Desk is faring is customer stickiness, or whether existing clients are renewing their contracts that typically have one-year terms. The company passes the test, having reported a customer retention rate of 95% in each of the past three years.

The Trade Desk is now looking at large international markets such as China and India for growth -- it launched in India this past June. With India's digital advertising market alone projected to grow tenfold over the next decade, The Trade Desk's total addressable market runs into trillions of dollars already, making it a compelling stock to own for the coming decades.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.