Okay kiddo, so back a loooong time ago, there was this place called Sumer. And in Sumer, they had kings who made rules for the people to follow. One of those kings was named Ur-Nammu.
Now, Ur-Nammu was a very important and powerful king, and he wanted to make sure that everyone knew what the rules were. So he had some really smart people called scribes write down all the laws and punishments he came up with.
These laws were written on big clay tablets and are now called the Code of Ur-Nammu. They were some of the first written laws in the world and were really important for making sure people knew what was right and wrong in society.
The Code of Ur-Nammu told people how they should act towards each other and what would happen if they broke the rules. For example, if someone caused harm to someone else, they had to pay for the damages. Or if someone stole something, they would have to give it back and also pay some extra money as a punishment.
So basically, the Code of Ur-Nammu was a way for a really important king to make sure his people were living together fairly and peacefully.