Many investors had a rough go of it so far in 2022. Inflation and rising interest rates weighed on stocks, with the S&P 500 index down 17% year to date. But one industry is thriving despite this weakness: energy.

Since the start of the year, the Energy Select Sector SPDR ETF has bucked the trend and surged higher 59% thanks to higher oil and gas prices, leading to record profits for those in the industry. This year, energy companies raked in big profits, allowing those in the sector to pay down debt and reward shareholders with fat dividends.

Although energy stocks are up significantly, supply-related events could push oil prices even higher. The Biden administration recently ended its releases of 1 million barrels per day from the U.S. Strategic Petroleum Reserve. Additionally, further European sanctions on Russian oil will go into effect on Dec. 5, and the U.S. and other G7 members are looking to put a price cap on Russian oil -- all of which could disrupt supplies.

Given the potential for further energy disruption, do energy stocks deserve a spot in your portfolio? Here are three you might want to consider buying right now.

1. ExxonMobil: This Dividend Aristocrat is prepping for a low-carbon future

ExxonMobil (XOM -0.09%) explores, produces, and moves crude oil, natural gas, petroleum products, and other petrochemicals in the U.S. and globally. The company has a long history in the industry and recently announced it would raise its dividend for the 40th consecutive year -- a testament to the strength of the business and strong capital management over the years.

It has benefited from higher Brent Crude Oil prices, which trade at their highest prices since 2014. Through the first three quarters of the year, ExxonMobil grew revenue 59% year over year to $318 billion while net income was up 202%. It also produced $22 billion in free cash flow -- money it can use to pay down debt, reinvest in its business, or pay to shareholders through dividends and stock repurchases.

ExxonMobil tackled its debt, paying down $24 billion in long-term debt since it peaked at $69.5 billion in the second quarter of 2020. It's also investing in its business to prepare for the green energy transition. One opportunity it invests in is carbon capture and sequestration (CCS), the process of capturing carbon emissions and then transporting and safely storing them elsewhere to reduce carbon released into the atmosphere.

The company estimates the CCS market could be worth $4 trillion by 2050 and has committed to investing $15 billion as part of its efforts to reduce carbon emissions. It has also rewarded shareholders handsomely, paying out $11 billion in dividends and another $10.5 billion in buying back shares. With a dividend yield of 3.08% and $30 billion in cash on its balance sheet, ExxonMobil is a solid energy stock to buy today.

2. Devon Energy: A cash-rich company with an attractive dividend

Devon Energy (DVN -0.46%) engages in upstream operations, exploring and producing oil. Last year, the company blazed a trail when it announced a fixed-plus-variable dividend policy, which allows investors to reap bigger rewards when oil prices spike.

The fixed portion of this dividend comes from 10% of its quarterly operating cash flow, while up to 50% of the variable portion comes from excess free cash flow. The company enjoyed higher oil prices, pushing its profits and free cash flow higher. Over the past year, Devon Energy paid out $6.20 per share in dividends, giving shareholders a stellar yield of 8.9%. 

Investors should remember that the dividend yield can fluctuate quite a bit. In the third quarter, Devon's dividend paid out $1.37 per share, down from $1.55 per share in the second quarter, as the company's free cash flow dropped due to lower oil prices.

Devon Energy is on track to generate record free cash flow this year of over $6.3 billion, putting it on a solid financial footing to make dividend payments, buy back stocks, and invest in the business. Being in a cash-rich position allowed Devon Energy to purchase two oil properties for a deal that will boost its cash flow by 25% in the fourth quarter, making this another solid energy stock for your portfolio. 

3. Occidental Petroleum: Reduced debt means more money for shareholders

Occidental Petroleum (OXY 0.09%) may be one of the more recognizable energy stocks this year largely because of Berkshire Hathaway's aggressive buying activity, increasing its stake to 914 million shares worth over $14 billion this year.

In 2019, Occidental spent $55 billion buying Anadarko Petroleum, which saddled it with a pile of debt. Higher oil prices helped boost its earnings and reduce its debt drastically. Since its debt peaked at $37 billion in 2020, Occidental paid nearly half of this debt, bringing it under $20 billion.

Reducing its debt below $20 billion will help Occidental get back to investment-grade status, giving it a lower cost of capital and saving it $350 million in interest expenses. The company will also begin returning more cash to shareholders through dividends and stock repurchases -- giving the stock another boost.

Occidental also plans to invest in the CCS business, using its existing assets and expertise to capture and transfer CO2, giving the stock excellent upside potential from here and making this another stellar energy stock to own today.