Energy is 2021's best-performing sector after being the worst-performing sector in 2020. But it makes up less than 3% of the S&P 500, so its gain doesn't really move the needle. 

Similarly, the energy sector makes up less than 3% of the Dow Jones Industrial Average, and the tech-heavy Nasdaq hardly includes any energy stocks. Cryptocurrency, electric vehicles, and big tech have captured the spotlight so far this year, but energy has been hotter than ever. Here's why the energy sector is doing well, as well as three stocks worth buying now.

A blindfolded lady searching for a bright lightbulb in a group of dull lightbulbs.

Image source: Getty Images.

Why energy stocks are crushing the market

One of the primary drivers of U.S. inflation growth, which is now 6.2% higher than a year ago, is rising energy costs. Heading into 2021, oil and gas demand was expected to rise as the economy reopened and folks made up for lost travel time. However, what wasn't expected was that supply wouldn't respond as it had in previous years.

WTI Crude Oil Spot Price Chart

WTI Crude Oil Spot Price data by YCharts

In 2020, many companies were forced to curtail production due to lower prices and weak demand. This year, many companies have chosen to moderately increase production to strengthen their balance sheets and focus on generating positive free cash flow (FCF). This widespread consensus strategy is causing runaway oil and gas prices, much to the benefit of the industry. While new players may be inclined to ramp production to take advantage of seven-year high prices, there's also investor pressure not to take on too much debt. Overly leveraged companies have been prone to cutting dividends, selling assets at the wrong time, or even bankruptcy.

A few energy stocks worth buying now

When it comes to good buys now, investors should turn toward companies that aren't solely succeeding because prices are high, but rather, have proven they can weather downturns. In the exploration and production (E&P) side of oil and gas, ConocoPhillips(COP -0.55%) has spent several years improving its efficiency so that it can break even at lower prices. Its strategy proved effective in 2020, as ConocoPhillips was one of just a handful of E&Ps that generated positive FCF.

COP Free Cash Flow (Annual) Chart

COP Free Cash Flow (Annual) data by YCharts

The chart looks bad, but it's worth bearing in mind that few companies could navigate a sub-$40 oil market.

Chevron (CVX -0.83%) and ExxonMobil were some of the only integrated oil majors that didn't cut their dividends. Like ConocoPhillips, Chevron prides itself on generating positive FCF even at low prices, sporting the healthiest balance sheet of its peers, and having an attractive and diversified asset portfolio.

With an annual dividend yield of 6.5%, Kinder Morgan (KMI -1.56%) is one of the few S&P 500 components that gives investors enough income to combat the current inflation rate. The company performed extremely well in 2020. Its 2021 full-year figures should come in close to its 2019 performance. Unlike ConocoPhillips and Chevron, Kinder Morgan can only benefit so much from higher prices because its long-term contracts cap its upside. But they also limit downside risk, which is why Kinder Morgan's business did well in 2020.

Management continues to reinforce its low spending strategy, a strong balance sheet, and plenty of FCF generation to fund its dividend and buy back shares. For risk-averse investors or anyone looking for a high-yield dividend stock, Kinder Morgan remains one of the best options out there.

Stick to companies that can perform through thick and thin

The energy sector is up an impressive 70% over the last year. But because it only makes up 2.9% of the S&P 500, its year of gains has only contributed a 2% gain to the index. Hopefully, investors will now have a better understanding of what makes up the S&P 500, as well as why it's easy for the market to not move even if a large sector of the U.S economy is doing very well.

Although it may be tempting to go after leveraged energy stocks that are booming right now, a better long-term move is to go with established players like Chevron, ConocoPhillips, and Kinder Morgan. In a basket containing equal parts of each stock, an investor would get an average dividend yield of 4.6% and exposure to the oil and gas integrated value chain.