A lot of international law governs war and armies.
The Geneva conventions give the bare minimum on how to treat human beings during war. They include having to medically treat injured enemy soldiers, not torturing prisoners of war, no collective punishment with both civilians and POWs, and no actions to directly hurt civilians such as burning down entire regions, poisoning water supplies or attacking known civilians.
You also have the Hague Conventions and various wepons conventions aimed at minimising suffering from non combatants.
It is generally accepted that if your enemy has not signed the convention, that you do not have to follow it. However every country has signed the main Geneva conventions.
There are also other laws about maritime borders and such.
An issue with international law is enforcing it, and generally only the loser of a war ever has to pay for the crimes committed. For example, Vladimir Putin is a wanted man by the international criminal court for war crimes committed in Ukraine, however he cannot be arrested if he stays in countries that do not follow the courts jurisdiction.
Latest Answers