It's hardly a secret that 2022 has not been a great year for investors. The market is down broadly since the start of the year, and many people are seeing big hits to their portfolio balances.

There are several reasons why stocks have been volatile. Inflation has been rampant since the start of the year, and that's led the Federal Reserve to get aggressive with interest-rate hikes. The fear there, though, is that the Fed's efforts to cool inflation could lead to a recession if expensive borrowing leads to a massive pullback in consumer spending.

While we're definitely grappling with a tough market and trying economic times, now's actually not the time to stop investing. Quite the contrary -- if you're worried about inflation, it's a good time to keep putting money into the market, especially since many stocks are trading at a discount.

A person with a serious expression at a laptop.

Image source: Getty Images.

Still, you may be unsure as to how to invest right now, given that no particular segment of the market is immune to volatility. If that's the case, you may want to take some advice from investing-giant Warren Buffett.

It pays to go broad

Warren Buffett has long said that broad market index funds are a great choice for everyday investors who don't want to take on the risk -- or legwork -- of loading up on individual stocks. As such, if you're not sure how to invest right now, consider an S&P 500 index fund, which will give you exposure to the 500 largest publicly traded companies today.

The benefit of going this route is that you don't have to sink too much time or effort into researching different companies. You also avoid the risk of choosing a company that ultimately underperforms in the near term.

Granted, when enough companies underperform, S&P 500 index funds can lose value. But all told, investing in the broad market may be a safer bet than putting all of your eggs into a few specific stocks. Plus, S&P 500 index funds give you the benefit of diversification -- something you'll need in order to grow your money over time. A diverse portfolio can also help protect you from losses to some degree during periods of broad market turbulence.

A good fallback option

If you're great at handpicking stocks and have a number of companies on your current watchlist, then by all means, put money into them now -- especially if you can buy shares at a discount. But if you're feeling lost on the investment front, consider heeding Buffett's advice and investing in the broad market.

We don't know when stock values will recover from where they are today. What we do know is that, as of this writing, the S&P 500 is down about 18% year to date. This doesn't mean its value won't dip further. But it also means there's the potential for a lot of upside if you invest in the broad market now, sit back, and give your portfolio time to grow.