United Nations officials warned that a protracted war in Ukraine threatened a hunger crisis in the country and around the world.