US President Donald Trump has issued a fresh warning to Iran barely 24 hours after his top diplomat declared the war over.