As inflation continues to soar, many Americans are worried that a recession is on the horizon. While nobody -- even the experts -- can say when or if we'll face a recession, it doesn't hurt to start preparing just in case.

If a recession is looming, it can be tempting to press pause on investing. But economic downturns can be one of the best opportunities to invest more, because stock prices are generally much lower.

It's critical, however, that you choose the right investments. Not all stocks will survive a recession, and investing in the wrong places could be costly. There's one exchange-traded fund (ETF), though, that's almost guaranteed to recover from a downturn: The S&P 500 ETF.

Why invest in an S&P 500 ETF?

An S&P 500 ETF is a type of investment that tracks the S&P 500 index itself, which means it includes the same stocks as the index and aims to mirror its performance over time.

The S&P 500 itself has a long history of recovering from even the worst recessions and market crashes. Over the last two decades alone, the market has experienced everything from the dot-com bubble burst to the Great Recession to the crash in the early stages of the COVID-19 pandemic. Despite everything, though, the S&P 500 has recovered.

That means if we do face another recession, the index is extremely likely to recover from this one, too. And because the S&P 500 ETF tracks the index, it will also bounce back.

Keep in mind, though, that no investment is immune to short-term volatility. The S&P 500 is already down around 17% so far this year, and it could fall further if we enter an official recession. However, keeping a long-term outlook is key.

Chart showing overall upward trend in the S&P 500 since 2000.

^SPX data by YCharts

Despite short-term turbulence, the S&P 500 has thrived over time. In fact, since 2000, it's earned returns of nearly 170%. By investing now and simply holding your investments for the long term, you're almost guaranteed to see positive average returns over time -- no matter what happens in the near term.

Is an S&P 500 ETF right for you?

S&P 500 ETFs are relatively safe, and they're fantastic for risk-averse investors as well as those who prefer a hands-off type of investment.

With an S&P 500 ETF, you never need to choose individual stocks or decide when to buy or sell. By investing in a single fund, you'll instantly own a small stake in all 500 companies that make up the index. All you have to do, then, is invest as much as you can afford and sit back and wait.

On the other hand, if you enjoy researching companies and hand-picking individual stocks for your portfolio, an S&P 500 ETF may not be the right fit. Similarly, if there are certain companies within the S&P 500 you'd rather not own, there's no way to opt out of investing in particular stocks with this type of investment.

Also, keep in mind that an S&P 500 ETF can only earn average returns. In other words, it's impossible for it to beat the market. If earning above-average returns is a priority for you, investing in individual stocks may be a better option.

S&P 500 ETFs are one of the safest investments to buy during a recession, because it's extremely likely they'll recover from any downturn. But they're not the right fit for everyone. Before you buy, consider your investing preferences to decide whether they'd make a good addition to your portfolio.