Heightened energy prices because of the US-Israel war with Iran has pushed US inflation to a three-year high.