Germany has been struggling to fill the army's ranks since abolishing compulsory military service. Under a new draft law, young men would be obligated to declare their interest in serving in the military.
Summary
Germany’s government approved a draft law requiring young men to indicate their willingness to serve in the military, aiming to increase military participation without reintroducing conscription.
The survey will target around 300,000 18-year-old males in 2024, with young women given the option to participate. This initiative follows years of recruitment challenges since Germany ended compulsory service in 2011.
With a growing focus on defense in response to Russian aggression, Germany seeks to increase its military personnel from 180,000 to 203,000 by 2030.
I don't think Germany is really an option, since the thing being discussed in this article (a) is just a proposal and (b) has nothing to do with foreigners anyway.
This is the official site of the ministry of migration and integration.
To serve in the German military, you need citizenship if I recall correctly.
You'd have to get here yourself, though.