How to avoid world war?

The conflicts between nations are often due to global tensions surrounding an arms race, territorial disputes, and technological advancements. To resolve this, creating a global administration or central government for the planet and assigning AI as the administering authority, while open sourcing all technology, could be a viable solution. By using robots to conduct surveillance for humans, political escalations could be eliminated, and all species on Earth could receive a fair share of resources. This approach could lead to greater peace and stability on a global level.