After more than two months of decline, gas prices are on the rise again in the United States for the second week in a row. As of Wednesday, October 12, the average price of gasoline in the U.S. was $3.922 per gallon, well over last year's $3.279 average at this time.

Prices hit record highs in June of this year but started to recede again soon after due to declining demand and concerns over a potential worldwide recession. Now, with several refineries in the U.S. closed and the conflict in Ukraine continuing to put pressure on energy prices, the cost of gas for Americans is increasing again.

On October 5, the Organization of the Petroleum Exporting Countries and its allies (OPEC+) also announced that it would be cutting its oil production by 2 million barrels per day, but it's uncertain how that announcement will affect prices long-term.

While it's likely that gas prices will see a short-term bump as a result of higher crude prices, the cut could have positive impacts on long-term investing. According to The New York Times, analysts have also confirmed that some OPEC+ countries are already unable to meet their production quotas.

On the other hand, some have argued that the sharp rise in gas prices seen following the OPEC+ announcement was the group's fault.

"With OPEC+ deciding to cut oil production by two million barrels a day, we've seen oil prices surge 20%, which is the primary factor in the national average rising for the third straight week," Patrick De Haan, chief petroleum analyst at GasBuddy.com, wrote in a blog.

President Joe Biden's Administration, which has been fighting to bring down gas prices since the summer, was quick to condemn OPEC+'s decision to cut production, adding that the White House plans to release more oil from the U.S.'s crude oil reserve.

"This is not the Biden administration's fault, but they know that if gas prices are back at $4.50 on Election Day, they're in trouble," said Tom Kloza, a founder of Oil Price Information Service.

However, Kloza also says say that crude oil isn't really the problem: shuttered refineries are.

Several U.S. gas refineries managed by BP (BP  ), Chevron (CVX  ), Phillips 66 (PSX  ), and Valero (VLO  ) are currently closed, but there isn't a consistent cause for the closures. For instance, at least one shutdown started in September was caused by a refinery fire, and that closure may last until early 2023, according to reporting from Bloomberg News. On the other hand, several other refineries are closed for routine maintenance.

"If we lost one of these big refineries that can run 500,000 barrels a day of crude or more, it can really haunt the markets," Kloza said.

The cause of rising gas prices has also impacted where the highest spikes have been seen: in areas near the most refinery shutdowns, like California, gas prices have risen sharply, while other areas like the midwest and Florida have actually seen prices decline in part due to reduced demand.