When Nixon took the dollar off the gold standard, money essentially became worthless and inflation roared. So of course the price of oil went up accordingly. Oil producing nations were receiving refined petro and food products like wheat at inflated prices of 300% and more, so they decided to correct this imbalance by raising the price of crude oil.
The 1973 war made things worse, OPEC wanted to punish the U.S. which was/is Israel's only ally.
Can't blame Jimmy for the 1979 energy crisis. All started with the Iranian revolution, which is the fault of U.S. foreign policy in the 1950's. The U.S. removed the democratically elected president of Iran and replaced him with the brutal Shah.
Guess what happens when a country is in a revolution, they don't produce oil. Bless Jimmy, the only decent man to hold the office of president. I would count RFK too, but they killed him before he had the chance.