By providing a ‘World Legal Unified International Organisation’. This would be given a renewable mandate by the World to ensure any conflict which immediately puts at risk the safety of civilians and related infrastructure is immediately brought to an immediate end by overwhelming force.
It would be comprised of the relevant region military and would be under one command which does not take any side in the conflict.
If we cannot reform the United Nations to provide a Peace Mandate and the organization to enforce it then we should disband the U.N and form a new Organisation which will ensure Peace in the World.
The Organisation that will be required to enforce the peace Mandate would not be a massive military force that spends all its time marching up and down.
It would be a leadership and logistics organization which would use the relevant military.
This is the only way we will ever get World Peace and an end to terrorism.