World War 2 was "the good war". It was manifestly clear who the bad guys were, especially when The Holocaust came to light. Other wars since then have been much more ambiguous. (As an aside, I find it weird that the French venerate Bonaparte, who had the same territorial ambitions as Hitler and willingness to shed blood - somewhere between 3m-6m people died during the Napoleonic Wars, an enormous number given the entire population of Europe was only 150m in 1800 - just not the propensity to wipe out Jews.) Anyway, American comics have always been very "good guy v bad guy" so casting Nazis as the villains is an easy fallback.
We see less Nazis in comics nowadays, and more fictional Middle Eastern countries - Qurac, Kandiq or whatever it is which Black Adam rules. I see from Doomsday cock that Geo-Force's Latveria has made a comeback, as an ally of Putin's Russia. I think we forget, as middle aged people, that when we first started reading comics - in my case, the mid 70s - only 30 years had passed since the war. Its now been 65 years. 9/11 was 20 years ago (we were on this message board) and that was the defining global event of most comic book writers and readers, not the Cold War or the Holocaust. (For people in their early 20s, it might be the Syrian civil war. I'll ask my oldest daughter.)