The United Nations has called for restraint amid increasing tensions between North Korea and the US over nuclear weapons.