Military spending surged across the globe last year to more than $224 trillion, with the war in Ukraine triggering the sharpest increase in defense budgets throughout Europe since the waning days of the Cold War.