In one sense, we have already done a great deal to prevent war. There has not been a war between major powers since World War II. There are at least five possible reasons for this, some of which could be extended to the rest of the world to make wars even less common.
One reason we have not had major wars is that they are so much more destructive than ever before. This is especially true with nuclear weapons. There is no real way for China or the US (for example) to truly benefit from a war with one another so they do not fight. When war will destroy both sides, it is foolish to start a war.
A second reason is economic and cultural interconnectedness. The world is so much more globalized today that countries need each other and feel connected to one another. It is much less conceivable, for example, to have the US and Japan fight one another today when we have so many economic ties and since so many people from each country live, study, and work in the other country.
Third, we are generally wealthier than ever before. We no longer need to go to war for economic gain.
Fourth, democracy has spread. Democracy makes countries less likely to go to war with one another. It is generally true that democratic countries do not fight each other.
Finally, war has simply gone out of “fashion.” We in the rich world no longer feel that it is morally acceptable to wage war to take territory from another country. This cuts down on the “need” for war.
If these conditions were to spread across the world, wars could be much less common. If we could make all countries richer, more democratic, and more connected to the rest of the world, wars would be even less common than they are now.