Shares of ExxonMobil (XOM -2.78%) slumped 9.4% in 2023, according to data provided by S&P Global Market Intelligence. Because of that, the oil giant significantly underperformed the S&P 500, which rallied 24.2% in 2023.

The main factor weighing on the oil stock was slumping crude oil prices. ExxonMobil tried to capitalize on that situation by going on a shopping spree.

Going shopping

Oil and gas prices cooled off last year. Crude oil was down about 10% on the year, marking its first decline since the pandemic. Meanwhile, natural gas prices slumped over 40% as the market adjusted to changes caused by Russia's invasion of Ukraine.

Lower oil and gas prices directly impacted Exxon's financial results last year. After producing a record-smashing $55.7 billion in profits in 2022, the oil giant's earnings were less than $29 billion through the third quarter of 2023. That was around $15 billion less than it made during the prior year period.

However, 2023 was still a solid year for the oil giant. It produced robust cash flow, enabling it to continue building a strong cash position. It also continued to grow its oil and gas production while delivering its best-ever third-quarter global refining performance.

Exxon also capitalized on the weakness in the oil patch to make a couple of acquisitions that should drive future growth. It bought Denbury Resources in a $4.9 billion all-stock deal. While Denbury produces oil, its extensive carbon dioxide infrastructure was the main draw. The transaction will enhance Exxon's ability to provide carbon capture and sequestration services to hard-to-decarbonize industries in the future.

The energy giant also agreed to acquire Pioneer Natural Resources in an all-stock deal valued at a whopping $64.5 billion, including Pioneer's debt. The acquisition will significantly enhance Exxon's position in the oil-rich Permian Basin. Exxon's production from the region will more than double (to 1.3 million barrels of oil equivalent per day) upon closing the transaction, which it expects will happen this year.

Meanwhile, Pioneer will give it the fuel to grow its regional output to 2 million barrels of oil equivalent per day by 2027. That will enable Exxon to increase its returns and cash flow in the coming years.

Is Exxon a buy after last year's slump?

Exxon took advantage of weakness in the oil market to enhance its lower-carbon and legacy operations by making two notable acquisitions. Those deals put the energy giant in a stronger position to grow in the future. This means last year's decline looks like a buying opportunity for investors seeking a top-tier oil stock to capitalize on the energy transition.