According to legendary investor Warren Buffett, you should "be greedy when others are fearful." It's an ethos I've taken to heart with the stock market enduring two big pullbacks since the beginning of 2020. Over the past 29 months, I've added nearly three dozen new holdings to my portfolio, as well as boosted my position in other existing stakes.

Similar to how the Oracle of Omaha works, my intention is to allow time to work its magic. Although not all of my investments will end up profitable, allowing the winners to run is what can generate game-changing wealth. My plan is to hold each of the following seven surefire stocks for at least 20 years.

An hourglass and stacks of coins illuminated by a light source in the background.

Image source: Getty Images.

1. Amazon

E-commerce kingpin Amazon (AMZN -2.64%) is a company I've held for more than two years.

According to a recent report from eMarketer, Amazon is expected to account for 39.5% of all online retail sales in the U.S. this year. That's 8.5 percentage points more than numbers 2 through 15 -- combined. Although its retail margins are unimpressive, the company's dominant marketplace is the springboard that fuels higher-margin channels like subscription services (Prime) and advertising. For instance, the annual fees collected from Amazon's 200 million Prime members help it undercut competitors on price and fuel investment in higher-growth initiatives.

What's far more exciting over the long run is Amazon Web Services (AWS). AWS is the world's leading cloud infrastructure service provider. Enterprise cloud spending is, arguably, still in the early innings, which means this high-margin segment can double Amazon's operating cash flow numerous times over the next two decades.

Amazon is a company for which Wall Street and investors regularly paid 23 to 37 times cash flow throughout the 2010s. With Amazon valued at closer to 10 times Wall Street's forecasted cash flow in 2024, I'm excited to see what the future holds.

A smiling person holding up a credit card with their right hand.

Image source: Getty Images.

2. Mastercard

Like Amazon, payment processor Mastercard (MA -0.06%) was a stock I added during the coronavirus crash of March 2020.

What I appreciate most about Mastercard is its cyclical ties. Even though recessions are inevitable and financial stocks tend to take it on the chin when economic contractions arise, periods of expansion last significantly longer than recessions. It's a simple numbers game, and Mastercard spends far more time in the proverbial sun than under the clouds.

Mastercard also avoids lending. While it would probably have no trouble generating interest income and fees as a lender, doing so would expose the company to loan losses during economic contractions. Strictly sticking to payment processing is Mastercard's not-so-subtle secret to juicy profit margins and bouncing back quickly from recessions.

There's an exceptionally long runway for Mastercard to expand its payment reach as well. Most of the world's transactions are still being conducted in cash, which should allow Mastercard to organically or acquisitively move into underbanked emerging markets and sustain a high growth rate.

Multiple rows of electric meters on a panel.

Image source: Getty Images.

3. NextEra Energy

Another surefire stock I have no intention of selling for at least 20 years is America's largest electric utility by market cap, NextEra Energy (NEE 1.01%). NextEra is a stock I added to my portfolio a little over a month ago.

Electric utilities aren't going to knock your socks off with their growth potential, but they provide almost unparalleled cash-flow transparency. If you own or rent a home, there's a really good chance you need electricity to power your lights and appliances. This makes demand for electricity highly predictable and is what allows NextEra the confidence to undertake new infrastructure projects without jeopardizing its quarterly payout or profitability.

The real differentiator for NextEra is its green-energy focus. No electric utility in the country generates more capacity from wind or solar. Though renewable projects can be pricey, the reward is substantially lower electricity-generation costs that have helped push NextEra's compound annual growth rate to the high single-digits. That's well above the sector's average growth rate, which tends to be in the low single digits.

An illuminated blue cloud on a processor that's surrounded by circuitry.

Image source: Getty Images.

4. Alphabet

FAANG stock Alphabet (GOOGL -1.33%) (GOOG -1.23%) is another company I added to my portfolio a little over a month ago that I have no intention of selling for a really long time. Alphabet is the parent company of internet search engine Google and streaming platform YouTube.

The first thing to love about Alphabet is its veritable monopoly in internet search. Data from GlobalStats shows that Google has controlled between 91% and 93% of worldwide internet search share over the trailing 24 months. Being so dominant in global search has helped Google command superior ad-pricing power.

But there's much more to like than just Alphabet's foundational search segment. YouTube is now the second most-visited social site on the planet (about 2.2 billion monthly active users). That's translated into significant ad revenue and subscription growth.

There's also Google Cloud, which slots in as the world's No. 3 cloud infrastructure services provider in terms of spending. Although Google Cloud is a bottom-line drag for Alphabet at the moment, it should be contributing a hearty amount of operating cash flow by mid-decade (and beyond).

A surgeon holding a one dollar bill with surgical forceps.

Image source: Getty Images.

5. Intuitive Surgical

Robotic-assisted surgical systems developer Intuitive Surgical (ISRG -1.76%) is a stock I added during the pandemic meltdown in 2020 that should deliver sustained double-digit growth.

Perhaps the best thing about Intuitive Surgical is its competitive edge. As of the end of March, the company had a worldwide installed base of 6,920 of its da Vinci surgical systems. While this might not sound like much, it's substantially more than all of its competitors. Because of the extensive training surgeons receive, as well as the cost of da Vinci surgical systems ($0.5 million to $2.5 million), buyers tend to remain loyal to Intuitive Surgical for a long time.

This is also a business where earnings growth can outpace sales growth for the foreseeable future. Over the past two decades, instruments sold with each procedure and system servicing have become the lion's share of Intuitive Surgical's total revenue. These are higher-margin segments relative to da Vinci system sales.

Though da Vinci is the leader in gynecology and urology procedures, robotic-assisted surgery is still just scratching the surface in thoracic, colorectal, and general soft-tissue surgeries.

A bank teller handing cash to a customer on the other side of the counter.

Image source: Getty Images.

6. Bank of America

On the other end of the spectrum is Bank of America (BAC 3.06%), which I've already been holding for over ten and a half years.

As noted, long-term investors in financial stocks enjoy disproportionately long periods of economic expansion. With Bank of America (BofA) cleaning up its loan portfolio following the Great Recession and boosting its liquidity, it's in a great position to take advantage of the natural expansion of the U.S. economy over many decades.

What makes BofA undeniably attractive as an investment is its interest rate sensitivity. No large bank stock should see a bigger lift to its net-interest income than Bank of America. According to the company, a 100 basis-point parallel shift in the interest rate yield curve is estimated to produce an extra $5.4 billion in net-interest income over 12 months. Fed rate hikes could potentially hit 200 basis points over the next year, which should be a boon to BofA's bottom line.

The cherry on top with BofA is that CEO Brian Moynihan is a big fan of rewarding shareholders via buybacks and dividend increases.

A person in a wheelchair holding a coffee mug in their hands while looking at an open laptop.

Image source: Getty Images.

7. Meta Platforms

The seventh and final surefire stock I plan to hold for at least 20 years is Meta Platforms (META -4.34%), the company formerly known as Facebook. Take note that Meta is changing its ticker symbol to "META," effective this coming Thursday, June 9.

Despite social media stocks getting taken to the woodshed in 2022, it's impossible to overlook how incredibly successful Meta's assets are at attracting users. Facebook, Instagram, and WhatsApp are consistently among the most-downloaded social media apps. They have collectively brought in 3.64 billion monthly active users for Meta in the first quarter.  This essentially means more than half the world's adult population visits a Meta-owned asset monthly. It's no wonder the company has exceptional ad-pricing power.

But the future for Meta is all about the metaverse, i.e., the next iteration of the internet, which allows connected users to interact with each other and their environment in 3D virtual worlds. Though it'll take years to get the necessary infrastructure in place for the metaverse, Meta has positioned itself to be a key on-ramp to this multitrillion-dollar opportunity.

I've been holding shares of Meta since the coronavirus crash, and with shares of the company now historically inexpensive relative to Wall Street's forward-earnings projections, I don't see that changing anytime soon.