Both world wars weakened Europe considerably. Europe lost millions of men, a good deal of its industrial capacity, and had to borrow billions of dollars to keep fighting these wars. While America fought in both world wars, its major cities were never bombed, its losses were relatively small compared to the other combatants, and the nation was able to profit from interest on the loans made to the Allied belligerents in both wars. After WWII, America even took an active role in promoting the regrowth of Western Europe through the Marshall Plan, and this led to increased American investment opportunities.
Not only did America gain in wealth, but it also gained valuable military knowledge and expertise. A nation is not truly a superpower unless it is willing to project force beyond its own borders. WWI demonstrated that America had an unprepared military, so while the army scaled back its personnel in the interwar years, American war planners began to make secret plans for wars against Japan and Germany. WWII demonstrated America's ability to raise millions of quality troops in a relatively short period of time and to arm them well and inexpensively. America also gained technologically through the use of stolen plans for German jets and the formation of the atomic bomb during this war. America would also become a leader in peacetime nuclear power.