Neither is communism.
The US's first global conflict wasn't with Germany plus Austria's screw ups twice or communism or Britain who wanted revenge via War of 1812. It was with Islam via their Ottoman Empire. They used their pirate fleets the corsairs to capture US trading boats(the US Navy wasn't established right away) and held as hostages and/or slaves. Then Barbary War I happened and the barely brand new country kicked the butt of a centuries old empire. . .twice.