The US was a local power, but by no means a global hegemon during that period.
Spanish American war was mostly isolated to the Western hemisphere (although the US gained colonial possessions after).
It took forever to join WW1 due to the small size of the US standing military. Same with WW2.
It wasn’t until after WW2 the US was able to project power globally and through that, set the global power structure with the USSR.