Warren Buffett is again doing one of the things he does best: going against the crowd. The billionaire investor and his holding company Berkshire Hathaway (BRK.A -0.76%) (BRK.B -0.69%) just increased their investment in energy stocks by $3 billion. That jump came through the purchase of a controlling stake in a liquified natural gas (LNG) facility.

The move comes at a time when energy stocks are underperforming the general market. In fact, in the first half of the year, energy stocks (down 5.1%) were among the three worst-performing sectors in the S&P 500 (utilities were down 6.6% and healthcare was down 4.4%). By comparison, the benchmark index overall rallied 15% so far in 2023.

Let's find out more about Buffett's investment in the underperforming energy sector and see if his strategy could work for you, too.

A controlling stake in an LNG facility

Buffett's Berkshire Hathaway Energy is buying a 50% stake in Cove Point LNG facility in Maryland, according to CNBC. The billionaire investor's company offered Dominion Energy $3.3 billion in cash -- and the deal increases Berkshire's overall stake in the facility to 75%, the news website reported.

This goes along with Buffett's general investment strategy. My colleague Sean Williams wrote about how most of Berkshire's portfolio is invested in only four sectors -- and one of them is energy. Chevron (CVX 0.37%) and Occidental Petroleum (OXY -0.15%) are among Berkshire Hathaway's top six holdings by value.

Though Buffett through Berkshire sold some Chevron shares in the most recent quarter, he increased the company's Occidental stake by 9%. And at the end of 2022, Berkshire Hathaway was the biggest shareholder in eight S&P 500 giants, including Chevron and Occidental Petroleum.

Buffett made this bet even as crude oil prices fell in the quarter. That said, oil prices have generally been on the rise over the past few years. And energy prices, in general, climbed sharply after the Russian invasion of Ukraine. Any political instability moving forward could put pressure on supply, supporting higher prices. Buffett clearly believes that, even if oil prices dip here and there, they'll remain high over time.

But could the billionaire's strategy work for you? And I'm not just referring to buying oil stocks. Yes, they do make a smart long-term addition to a diversified portfolio. But when I refer to Buffett's strategy, I'm talking about the ability to seek out opportunities -- even in sectors or stocks that are out of favor at a given moment.

Getting interested when no one else is

Here's one of my favorite Buffett quotes that illustrates the point: "Most people get interested in stocks when everyone else is. The time to get interested is when no one else is. You can't buy what is popular and do well."

So the idea here is Buffett is increasing his bets on energy, even though this sector hasn't drawn the most interest in the first half of the year. And at the same time, he's not piling into the technology stocks that have led the rally so far.

This strategy can work for all of us -- even if we don't have billions of dollars to invest. When an industry or company falls out of favor, the long-term prospects of that particular industry or company don't necessarily change. But, often, valuation declines. And that offers us a great opportunity to follow in Buffett's footsteps and pick up an asset for a bargain. Since, like Buffett, you plan on holding on for the long term, it's OK if your chosen stock doesn't rise overnight.

Buffett (again through Berkshire) did this with Coca-Cola back in the late 1980s and early 1990s. Since Buffett's initial purchase, the stock has soared more than 2,000% -- and he's collected millions of dollars annually in dividend payments.

As you look at potential stocks today, like Buffett, you might want to consider industries that haven't necessarily led gains since the start of the year -- such as the energy sector. They may represent great long-term opportunities hiding in plain sight.