The S&P 500 index faced its share of turmoil earlier this year, even temporarily slipping into bear territory amid concerns about the economy ahead. Investors worried that President Trump's import tariff plan would hurt the spending power of consumers and businesses -- and damage companies' earnings prospects.

In recent weeks, though, sentiment has improved. Trump's trade agreements with the U.K. and China, as well as signs of flexibility on tariff levels, have soothed investors' minds -- and an appetite for stocks has returned. In fact, the S&P 500 even closed at a new record high on June 27, cementing a gain for the first half of the year. Considering all of this, is the Vanguard S&P 500 ETF (VOO -0.05%), a fund that tracks the major benchmark, a buy now? Let's find out.

Two investors study something on a computer in an office.

Image source: Getty Images.

Investing in ETFs

First, let's talk a bit about investing in exchange-traded funds (ETFs). These assets trade daily on the market like stocks do, so they aren't complicated to buy or sell. Investors often opt for ETFs as a way to automatically gain exposure to many stocks with just one purchase. These stocks may all operate in the same industry, or they might belong to a broad benchmark like the S&P 500.

So an ETF allows investors to quickly diversify within a sector or across sectors. Diversification is positive because it means that if one particular stock or industry faces tough times, others may compensate, and that limits the negative impact on your portfolio.

One thing to note before you buy an ETF: These investments involve fees, and you'll see them as expense ratios. Aim to buy ETFs with expense ratios of less than 1% to maximize your gains over time.

Now, let's move along and consider the Vanguard S&P 500 ETF, one that mimics the composition and therefore the performance of the S&P 500. And that makes a purchase of this ETF the best way of betting on the performance of the general stock market.

11 industries, from tech to healthcare

This ETF offers you exposure to 11 different industries from tech to healthcare and financials just to name a few. The most heavily weighted these days is the tech industry, which makes up more than 31% of the ETF. That isn't surprising, considering the growth of technology stocks today and their role in the economy. It's important to note that the S&P 500 index rebalances quarterly, so that it always includes the most compelling companies of the day.

That means when you invest in a fund that tracks the S&P 500, you'll always have exposure to the most exciting and well-established companies of the times, ensuring you both growth and a certain level of security. Over time, this approach has resulted in solid performance. Today, a purchase of this fund will offer you exposure to big names such as artificial intelligence (AI) chip giant Nvidia, software powerhouse Microsoft, and big pharma company Eli Lilly -- and of course many more major names.

Since the S&P 500 launched as a 500-company index back in the 1950s, it's delivered a 10% average annual return, making it a fantastic investment for long-term investors.

Should you buy at the high?

But is now, with the S&P 500 at a new high, really the right time to invest in a fund that tracks it? After all, you would be buying at the highest level ever. The answer is yes, and here's why.

The general index throughout its history always has gone through periods of declines and then gone on to reach new highs again -- and this has happened multiple times. The following chart, dating back to 1990, offers us an example of this pattern.

^SPX Chart

^SPX data by YCharts

This gives us reason to believe that the index will continue along this path. And that means a purchase at the high right now still leaves plenty of room for additional growth in the near term and over the long run.

It's key to focus on this long-term element when investing in the benchmark and in stocks in general. By doing so, you may experience some of the tougher markets, but you'll also benefit from periods of high growth. And if you choose quality companies, or in this case, choose to invest in a fund that tracks the S&P 500, this long-term investment may deliver a big win over the long run. That's why now, even with the S&P 500 at a high, is a great time to get in on the Vanguard S&P 500 ETF.