Um, how do you figure? You realize that was a 10% cut in global oil supply, right? Of course it's going to spike crude oil prices. It's almost like the US completely stopped producing oil for 2 year (13M vs 9.7M).
There are a number of elements that go into gas prices like additives, refining margin (called the "crack spread") and distribution but crude oil prices are a huge part of that. Also, like anything demand plays a huge role and that means the market's expectation for future supply.
Oil prices nearly doubled between early 2021 and mid 2022, which coincides with peak inflation in the US and also covid19 restrictions easing. 2020 to mid 2022, QE was so nuts that M2 supply rose 40%. Is oil demand inelastic enough that a 10% supply cut means a 100% price increase? It's possible, but hard to tell given what else was going on at the same time.
Iran War is hard to compare to because there's price speculation around war now, rather than just OPEC cuts. But anyway what's interesting about Trump making a deal with OPEC to cut supply is that it kinda makes the US part of the oil cartel.