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.
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.