Iran is experiencing an energy crisis. But this isn't something new. It's the culmination of long-term trends that have finally gotten out of hand:
These numbers are approximate, but it hardly matters. Over the years Iran has encouraged massive and wasteful household consumption of natural gas, while sanctions and mismanagement have prevented production from catching up. And Iran's production woes were recently made worse when Israel bombed a couple of their pipelines.
Iran makes up for this by importing gas from Turkmenistan and, more recently, Russia, and by using fuel oil in place of gas. Unfortunately, the fuel oil tradeoff has become more difficult. Iran needs to re-inject gas into its aging oil fields to keep up production, and when they cut back on re-injection to preserve gas supplies they end up with less fuel oil. It's Catch-22.
This juggling act has long produced regular shortages, especially in winter, but it's finally caught up with them and Iran now has a massive year-round shortfall of gas compared to consumption. This forced a choice: cut back gas to households or cut back gas to electric power plants. They chose to keep households happy and instead shut down electric generation, so they now have rolling blackouts throughout the country.
There's no short-term answer for this. Iran's gas infrastructure needs massive investment, which will take years at minimum. Nor can Iran easily produce more fuel oil to substitute for gas. Nor, thanks to sanctions, can they afford to import more gas. At this point, there's little they can do aside from risking revolt by limiting gas supplies to households. Or they can pray for a mild winter.
Guns versus butter.
Prayer is something the theocratic Iranian govenment has plenty of. It hasn't helped them much lately.
Fund Hezbollah, Houthis, Hamas, support Assad, and build up nuclear weapons research, or infrastructure? The priorities seemed obvious at the time for the Ayatollah(s), assuming of course, they could hold onto their autocratic theocracy.
Yet they still continue to export oil:
https://www.ceicdata.com/en/indicator/iran/crude-oil-exports
Oil companies will also pump carbon dioxide into wells to drive up production. They'll also flare off the natural gas coming out if they're not equipped to capture it. I'd guess the state of the fields in Iran is not the best.
I'm guessing this is why Iran didn't escalate in response to Israel's retaliations. Seems like their infrastructure could be destroyed relatively easily.
"Informed" critics, you might remember, sneered at the very idea Iran might want a nuclear program to meet its energy needs. Why, the place was awash with oil and gas!