Maciuś (as he is called in the original and in the German translation) becomes the king at a very young age. Despite his advisors, he enacts a set of bold reforms, trying to improve people’s lives. It all goes wrong after a while, because ruling is complex, as it turns out, and also people are not exactly cooperative.
When a war breaks out, he joins it anonymously, and things get really rough. When he later falls in love with an African princess, he learns about racism. When he belatedly notices corruption in his kingdom and has his ministers arrested, he realises that he doesn’t know enough to rule without them, and has to release them (and institutes a constitutional monarchy).
My biggest lesson from this book was how fiendishly complex the world is, and how little decisions can have complex consequences. And also that war is horrible.