In 2020, German spent about 53 billion USD on its military, that’s rank 7 world-wide. The UK spent 59 billion, about the same ballpark. The bigger problem in Germany is inefficient spending.
I'm not saying social spending is bad, just that if playing a lead role in a pan-EU army is Germany's interest then it needs to spend more.