It began as a mostly rural republic that had about as many full time soldiers as the Cree tribe had armed (with guns) fighters; Lafayette thought that USA would need French protection for a few centuries.
Then, American industrial capacity exploded and by 1900, it was competing for the first place with the UK and Germany. The entry of the US to both WWI and WWII made the decisive result precisely because of enormous American capacity to produce stuff.
That said, loss of American production capacity in the last 30 or so years ("the giant sucking sound" of Ross Perot) may really be an early sign of decay. Having digital giants is fine, but they won't produce a billion of N95 masks on demand.
However, as countries rebuilt their production infrastructure, competition went up, driving prices down, diminishing profits and the US started moving away from manufacturing.
The US had untilled praries, virgin forests, mountains of iron hills of coal, oceans of oil, a network of rivers and harbours (supplemented with canals and railroads), and no credible foes on the continent.
Russia at the time was not quite as advantaged, but strongly comparable in many regards.
The existing Great Powers of 1900 had extensive agriculture and coal energy resources (Britain, Germany, France), and at least some colonial holdings for further raw materials. But all were more constrained than the US, as well as knocked back by WWI.
WWII promoted an explosion in US industrial and resource extraction capability whilst Europe was again set back
Post WWII, the US retained its advantages, an intact (and substantially recently built) industrial infrastructure, and no international competition, as noted above. The Martial Plan and Japanese and Korean reconstruction helped.
Yes, America got lucky for about 25 years and isn't so lucky anymore. But even here the old adage says that luck favors the prepared.
I am going to tell you what made America great, but you will not necessarily like it:
WW2 devastated the most important industrialized economies throughout Europe and Asia. The US was left intact.
For many years, the US was #1 in exports, #1 in manufacturing, and most importantly, the Bretton Woods system was in place.
Under Bretton Woods, the US was effectively able to create money from thin air. The premise was that each dollar was backed with gold, and you could at any time redeem the gold equivalent to your dollars. However, because that right was never exercised and nobody could audit the gold reserves, the US abused the system and by 1971 it became clear that it was a fraud.
By 1971, Europe and Japan were done rebuilding their economies and now their manufacturing capabilities surpassed the that of the US. So countries like France take the initiative and challenge the US to give them their gold, and when the US fails to meet these obligations, the Bretton Woods system ends, also putting an end to the American economic golden age.
https://en.wikipedia.org/wiki/Exorbitant_privilege
https://en.wikipedia.org/wiki/Nixon_shock
Since the Nixon shock, US living standards have started becoming similar to that of other countries, the cost of living has been raising and the US has been accumulating an enormous amount of debt.
Think about it: during the 1940s to the 1970s, the Interstate highway system was built, there were expensive Space exploration programs, millions of Americans had affordable housing, higher education... everything was affordable. And suddenly nothing is affordable anymore. And that is the reason.