As concerns surrounding a potential recession continue to grow, now is a fantastic time to make sure you're investing in the right places.

Although the future is still uncertain, it's looking more likely that a recession may be looming. Tough economic times are always daunting, but when your portfolio is filled with healthy investments, you can rest easier knowing your money is safer.

While everyone's investing preferences are different, there's one exchange-traded fund (ETF) that's highly recommended by legendary investor Warren Buffett -- and it's almost guaranteed to make you money over time.

Buffett's No. 1 investment recommendation

Though Buffett's own portfolio through holding company Berkshire Hathaway is largely comprised of individual stocks, he does own two ETFs: the Vanguard S&P 500 ETF (VOO 0.08%) and SPDR S&P 500 ETF Trust (SPY 0.06%).

The S&P 500 ETF tracks the S&P 500 index itself. It includes roughly 500 stocks from the largest and strongest U.S.-based companies, including household names like Apple, Amazon, and Microsoft. When you invest in an S&P 500 ETF, you'll own a stake in all the companies within the index.

Warren Buffett has long recommended the S&P 500 ETF for new and experienced investors alike. He also famously bet that this investment would beat a group of hedge funds back in 2008. He easily won that bet, with his fund earning returns of nearly 126% over 10 years, while the five hedge funds averaged returns of just 36% in that time.

The S&P 500 ETF is also a fantastic choice if you're concerned about a recession. Over the decades, the index itself has experienced countless recessions, crashes, and bear markets. Yet it has a perfect track record of recovering from even the worst downturns.

In the last two decades alone, the S&P 500 has faced the dot-com bubble burst, the Great Recession, the COVID-19 crash, and the current slump. Despite everything, though, it's still up by more than 180% since 2000.

^SPX Chart

^SPX data by YCharts

In other words, if you had invested in an S&P 500 ETF in 2000 and simply held on to it, you'd have nearly tripled your money by today -- despite experiencing some of the most severe downturns in history over the last two decades.

How much can you earn with an S&P 500 ETF?

Despite being a lower-risk investment, the S&P 500 ETF is still a powerhouse. Given enough time, it could help you earn hundreds of thousands of dollars or more.

Historically, the S&P 500 itself has earned an average rate of return of around 10% per year. Though you're unlikely to see 10% returns year after year (and during periods of volatility, you may not see positive returns at all), all the annual highs and lows should average out to around 10% per year over time.

If you're investing, say, $300 per month in an S&P 500 ETF while earning a 10% average annual return, here's approximately how much you could accumulate over time:

Number of Years Total Savings
20 $206,000
25 $354,000
30 $592,000
35 $976,000
40 $1,593,000

Data source: Author's calculations via Investor.gov.

The sooner you get started investing, the easier it is to build a portfolio worth hundreds of thousands of dollars (or, in some cases, well over $1 million).

Economic downturns are tough to stomach, and if a recession is on the horizon, there's not much you can do besides take steps now to prepare for it. By investing in an S&P 500 ETF, you'll not only give your investments a fantastic chance at recovering from a recession, but you could also make a lot of money over time.