International law goes back a long way. Certainly, in the aftermath of the American Civil War, the USA successfully 'sued' the UK for certain help given to the CSA which had damaged US commerce. They received damages.
Then we have the Geneva Convention which regulates the conduct of war.
In 1945 we had the Nuremberg Trials, where an 'International Court' aggregated to itself the right to string up various Nazis. Exactly on what legal basis I am unsure.
Subsequently, we have several UN treaties that (at least in theory) impose duties on nation-states. The Refugee Convention is a salient example.
While the system is imperfect, what is the alternative? Anarchy? I think we should at least have a principle that nation-states are answerable for their actions and that redress is available.
Ideally we all adhere to it but unfortunately our geopolitics is very much might makes right….