When did international law begin? In antiquity (see David J Bederman’s book)? The Middle Ages? 1648? Legal positivism and the rise of nationalism in the 19th century?
The lawyer’s answer is simple: It depends. It depends on whether one defines international law as a set of rules between large groups (sometimes referred to as tribes), between nations, or primarily between states. If one adopts the former, international law is as old as humanity itself. The second would be tied to the beginning of nationalism (the answers to this question differ). And the third to the emergence of the modern nation states (which started with the peace of Westphalia 1648). To quote Stephen C Neff,
If by ‚international law‘ is meant merely the ensemble of methods and services which give an element of predictability to international relations, then the origin may be placed virtually as far back as recorded history itself. If by ‚international law‘ is meant a more or less comprehensive substantive code of conduct applying to nations, then the late classical period and Middle Ages was the times of its birth. If ‚international law‘ is defined as the integration of the world at large into something like a single community under a rule of law, then the nineteenth century would be the earliest date (perhaps a trift optimistically). If, finally, ‚international law‘ is understood to mean the enactments and judicial decisions of a world government, then its birth lies (if at all) somewhere in the future—and, in all likelihood, the distant future at that.
Stephen C Neff, ‚A Short History of International Law‘ in Malcom D Evans, International Law (5th edn, OUP 2018) 3, 4.