Preventing and punishing genocide is a requirement of every UN country, per the Genocide Convention:
https://en.wikipedia.org/wiki/Genocide_Convention?wprov=sfla1
Most international legal scholars believe that it is a jus cogens -- a fundamental law that all states must abide by, even if they are not signatories.