At the same time, the United States has been indispensable to world peace. Since World War II, the entire planet has been enjoying it's single greatest period of international peace in human history. War and deaths from war are at all time lows. In 1600 everyone on the planet had a 25% chance of being killed in a war. Today, even in the worst world war zones on the planet -- Central Africa, Afghanistan and Syria -- that chance is still less than 1%. And those are worst individual conflict regions currently in existence. Averaged across the whole of the planet, you have a much greater chance of dying in a automobile accident than in the war.
In large measure that has been because of American political and military polices since 1945. The US military was made into a behemoth without rival on purpose. It's mere existence encouraged most nations to stop trying to build large militaries. To most of the Western Alliance went the added promise of American protection if it ever was required.
The United States also engaged political and economically with the rest of the world. The US helped to create and worked closely with the United Nations, European Union, NATO, NAFTA, G7 and G20, WTO, OAS, and later even with OPEC, the African Union and The Arab League. As well as with a large number of political and trade agreements with various nations outside those groups.... such as Japan, Australia, New Zealand, Israel, Mexico, etc.
This was done largely to make sure conflicts didn't start. The US would engage the political forces that groups could exert to prevent most military conflicts before they started.