Although it is worth noting that the war spending the US does do also doesn't translate into being an undisputed global power. They burned a trillion or few in Afghanistan and I doubt that impressed anyone in particular. They didn't achieve anything. Challengers to the global hegemony multiplied in the aftermath.
If they hadn't wasted the resources they'd just be better off with no downsides.
If they hadn't wasted the resources they'd just be better off with no downsides.