U.S. consumer prices rose in April, fueled by a spike in energy prices caused by the Iran war.