The war caused energy prices to go crazy, Europe needed gas and was willing to pay a premium, and the laws of supply and demand meant the price went up for everyone.
I used to live in a country where the government subsidized the price of oil (including petrol). When they needed to cut that subsidy, people knew the price of oil would go up, and that affected the price of everything else, my reasoning was because all the trucks transporting goods needed petrol, but it's probably because everything needs energy to accomplish..