The US has stumbled along. In the 1990's we fought a war against the Sunni led government of Iraq after Iraq invaded Kuwait. That war was largely to defend stability in the oil world.
Then, after that war, we thought we had made a mistake by abandoning the majority Shiite population, in Iraq, who were still under the boot of the Sunni lead government of Saddam Hussein. We went back to help out the poor Shiite majority that we had abandoned and left to languish as they were caught between Hussein's brutality and our economic sanctions on Iraq.
The second war delivered Iraq to it's Shiite majority and to Shiite led Iran. Delivered to Iran on a silver platter made from our money.
Then we realized that was a mistake and have been trying to patch up ever since. Now hostility is kicking into high gear between the US and Iran.