Europe didn't slack off militarily during the Cold War. Germany, for example, poured massive amounts of money and resources into the Bundeswehr to be able to fend of the Soviets. The US relied as much on the European members of NATO as the Europeans did on the US.
After the Cold War, both the US and Europe scaled back their military spending and enjoyed the peace dividend. It was only after 2001 that the US increased its budget again – but to fight insurrectionist wars (which EU members aren't particularly interested in), not in a peer conflict. They're not prepared for a pro-longed war against a near-peer power.
So although I agree that Europe should be rearming heavily, and should have started in 2022 at the very latest, it's not like the US did really much better. They're really good at curb-stomping much weaker opponents, like Venezuela or Iran, but they haven't seriously prepared for a war against China.