One is not exclusive of the other. Do you really expect any European politician to tell the public that they are benefiting from the Russia-Ukraine war because of the increased defense spending? The fear-mongering in Europe, due to the war, is the only thing allowing many of them to increase military budgets without much opposition. (Look at the violent protests happening in France because the citizens fear that the government has, and will, cut back on social spending, and divert the money elsewhere).
It's too much effort to write an answer here. (The new protests in Germany, like in France, is another symptom of the economic woes of EU members). But I've given you enough of a gist on the topic to do some research on your own if you are interested in learning more. There are plenty of resources on this topic online.