Just a few months ago, healthcare was the third-highest-weighted sector in the S&P 500 behind only technology and financials. But healthcare has been drastically underperforming the S&P 500 to the point where it has now slipped behind consumer discretionary and communications.

Investment management firm Vanguard has sector-based exchange-traded funds (ETFs) that offer low-cost ways to get exposure to any sector of your liking. Here's why the Vanguard Healthcare ETF (VHT -0.57%) stands out as a top ETF to buy now.

A person smiles while a health professional uses a stethoscope to examine them.

Image source: Getty Images.

The sector is beaten down

Healthcare is the biggest sector laggard year to date.

VIS Chart

VIS data by YCharts.

The sell-off is due to myriad factors. Investors are shifting toward growth-focused sectors that benefit from artificial intelligence (AI) -- like tech and communications -- or cyclical sectors that benefit from economic growth -- like industrials and financials.

Healthcare is a safe and recession-resistant sector similar to consumer staples or utilities. Investors tend to gravitate toward these sectors during times of uncertainty. But when market gyrations are influenced by optimism, healthcare stocks may not look as attractive to short-term-focused investors. Taking a long-term mindset when sectors or individual stocks go out of favor can be an excellent way to compound wealth over time.

Another factor impacting healthcare is the epic collapse of UnitedHealth Group -- one of the largest health insurance companies in the U.S. The stock, once viewed as a blue chip stalwart, is down over 50% from its all-time high due to rising costs, changing federal polices, and investigations by government agencies into the company's fee structure. UnitedHealth is still a large holding in the Vanguard Healthcare ETF, but it used to be the single biggest holding. Anytime a company with that much influence undergoes a steep sell-off, it's going to bring down the sector with it.

Aside from UnitedHealth's company-specific troubles, there's also been a general cooldown in investor excitement for weight-loss drug stocks. Novo Nordisk, which makes the popular diabetes drug, Ozempic, and weight-loss drug Wegovy, is down over 50% from its 52-week high, while pharmaceutical giant Eli Lilly, the largest healthcare company by market capitalization, is down just shy of 20% from its 52-week high.

Novo Nordisk isn't in the Vanguard Healthcare ETF because it is a Danish company, and the fund focuses on U.S. companies. The ETF would be down even more if it included Novo Nordisk since the company still has a market cap north of $300 billion even when factoring in its sell-off.

In sum, the Vanguard Healthcare ETF is being dragged down by some of its largest holdings for industry-specific reasons, but there's also the broader sector rotation out of safer, risk-averse sectors toward cyclical sectors.

Using ETFs to accomplish investment objectives

A common investment principle is to understand what you own and why you own it. Depending on a person's professional background, expertise, and interests, some companies may be easier or harder for an investor to understand. But there are also plenty of companies that many of us interact with on a regular basis, from Apple and Amazon to Walmart and Visa. It's easier to understand a business model if you've been a customer.

Healthcare is distinct due to its complexity and the dynamic interplay between the public and private sectors. In the pharmaceutical space, the progression of clinical trials and roadmap to bringing innovative drugs with breakout potential to market can alter an investment thesis -- for better or for worse. For these reasons, healthcare stands out as one of the most difficult sectors to understand. At the very least, it's the one where I feel like so much can change that it's more challenging to build a lasting investment thesis. Just look at companies like Pfizer, Merck, or Johnson & Johnson -- former darlings whose stock prices have gone essentially nowhere for years.

For these reasons, I think healthcare is an especially intriguing sector to approach using a low-cost ETF. That way, the booms and busts among drugmakers are smoothed out through diversification. And if there is a black swan event, such as what happened to UnitedHealth, at least the exposure is limited. With just a 0.09% expense ratio, or 90 cents for every $1,000 invested, the fund isn't going to rack up high fees.

A sector that's worth a closer look

The Vanguard Healthcare ETF is so beaten down that it sports a mere 24.1 price-to-earnings (P/E) ratio, and its dividend yield is up to 1.6%, which is dirt cheap considering the fund's top holding, Eli Lilly, has a P/E over 60 and a less-than 1% yield. Without that holding, the ETF would be an even better value.

All told, the healthcare sector stands out as a solid investment, particularly for folks seeking to diversify a growth stock-heavy portfolio or risk-averse individuals looking to boost their passive income.