The UN has formally called for an end to the war in Ukraine and demanded Russia immediately withdraw.