The key measure of US inflation rose in April to its highest level since May 2023 as consumers feel the impact of the Iran war.