One of the main ways in which the XYZ Affair helped build the country's armed forces was that it brought the United States and France close to an armed conflict, which forced the US to prepare its military and military supplies.
The League of Nations was created after the first World War to provide a forum for resolving international disputes between other nations.