The UN has warned that the cost-of-living crisis could spark a "cycle of social unrest leading to political instability" in many countries worldwide.