When the pandemic hit in 2020, it seemed like we might be in for an energy crisis as demand collapsed around the world. People stopped driving, businesses shut down, and the price of nearly every energy commodity collapsed.

Now the tables have turned. The economy is picking up again, especially in the U.S., and demand for oil, natural gas, and even coal is on the rise. But investment in new capacity isn't meeting this renewed demand, as companies and investors have been hesitant to put money into fossil fuels. The result is that energy stocks that have underperformed the market for years are now some of the best performers in 2021 (as you can see below). 

What I think is becoming clear is that the energy crisis that's bubbling up now isn't going to end anytime soon. Oil, natural gas, and coal prices are likely to remain elevated, and maybe even move higher as demand outpaces supply on a global level. 

^SPX Chart

^SPX data by YCharts

Coal is back

The most surprising energy trend in 2021 is what's happening in the coal industry. After years of declines, coal is seeing a resurgence as U.S. coal plants are used to meet increasing electricity demand and countries like China use more coal to run power plants. Since coal had seen demand fall in the years leading up to the pandemic, reducing investment in mining, even a small increase in demand can send prices soaring. 

US Coal Consumption Chart

US Coal Consumption data by YCharts

On the spot market, coal prices have nearly tripled this year as the supply and demand imbalance has widened. And without an increase in mine output -- which doesn't seem to be on the horizon given that few countries want to increase their carbon emissions -- the problem may get worse before it gets better.

Natural gas production is lagging demand

A similar supply and demand dynamic is playing out in natural gas. You can see below that natural gas consumption has actually been very steady over the past few years, but production is down from its late-2019 peak as producers have cut back on investment. 

Henry Hub Natural Gas Spot Price Chart

Henry Hub Natural Gas Spot Price data by YCharts

Prices are starting to react, which could lead to more production long-term -- but if the economy picks up or the winter is cold, we could see demand exceed supply, leading to even higher prices. And it'll take months, if not years, for producers to respond. 

Drilling rig in an open field.

Image source: Getty Images.

Oil is surging, but supply isn't

Not surprisingly, oil markets are in a similar situation. You can see that U.S. production has dropped by about 12% since the pandemic started. But demand is coming back sharply, and could soon exceed pre-pandemic levels. 

US Crude Oil Production Chart

US Crude Oil Production data by YCharts

According to the U.S. Energy Information Administration, an average of 18.2 million barrels per day of oil were consumed in the U.S. in 2020. Between June and August 2021 consumption was already up to 20.8 million barrels per day. That's not only a sharp increase in demand in a short period of time, demand is already back to pre-pandemic levels.

After years of being oversupplied, oil and gas markets are now seeing supply constraints, and we're seeing the fallout from energy companies cutting capital expenditures during the pandemic. For example, ExxonMobil (NYSE:XOM) announced earlier this year that it will spend $16 billion to $19 billion on capital expenditures this year, down from an original budget of $33 billion for 2020 before the pandemic hit. Despite the fact that oil prices are higher than pre-pandemic levels and demand is also back, management said they expect capital spending of just $20 billion to $25 million annually through 2025. So spending is being cut back even as energy prices rise, and that'll likely put more strain on the market.

Coal, oil, and gas companies don't seem to have an appetite to increase spending even as profits rise and commodity prices go up. Even if they did, higher raw material prices, equipment shortages, and labor shortages could lead to slow increases in production, putting pressure on the supply side of the energy industry. 

Renewable energy

The fastest-growing segment in renewable energy over the last decade has clearly been renewable energy, led by wind and solar energy. The problem for renewable energy answering the supply crunch highlighted above is that it's not an on-demand energy source that can fill the market need right now. When more supply is needed, it can take years to get projects off the ground. 

While renewable energy may not be the solution to the current energy crunch, it will continue to add supply to the market that will generate energy for decades. And higher coal, natural gas, and oil prices around the world make projects being built right now more economical. 

US Renewable Energy Production Chart

US Renewable Energy Production data by YCharts

What investors need to keep in mind long-term is that wind and solar power plants generate power for decades, so once they're built they're like a baseline source of power. And if renewable energy takes market share from fossil fuels when fossil fuel energy markets are undersupplied, there will be a smaller pie for fossil fuels to fight over when energy markets get back to a more balanced state. 

Price pressures look set to continue

On the demand side, consumers are clearly back to pre-pandemic levels, at least in the U.S., and demand could grow as the economy improves and stimulus leads to more investment. But supply doesn't seem to be keeping pace. Companies have little ability or incentive to increase investment, and can simply cash in on higher commodity prices. 

Oil, gas, and coal prices may be up big in 2021, but I don't see the trend changing anytime soon -- and that's good for oil and gas stocks for the foreseeable future. 

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.