It had nothing to do with the Iraq War. If you look at a graph of German natural gas imports from Russia by year, you will not see any major changes after 2003. Imports from Russia (back then, the USSR) reached 50% of total imports in the 1980s, and flatlined after that.[0]
I say energy markets, because global availability of gas doesn't seem to be an issue, prices are. Gas shortages have nothing to do with crazy electricity prices lately. And even then there were no shortages or blackouts anywhere in Europe so far. Energy prices did hurt industry and drove inlfatuon, sure, but this is a global issue not sole caused by the war in Ukraine, COVID, Chinese lockdows and the chip shortage all played a role in that. As did the constant injection of money into the global economy since 2008.
I’m not here to justify the Iraq war, and no good faith reading of my post would suggest that.