From your question closed as a duplicate:
"The defence spending of [all / all the] countries increases if the defence spending of [one / a] country increases."
The defence spending of all countries increases if the defence spending of one country increases.
Correct. You do not have the context of a definite set, so you do not need (and must not use) the definite article.
The defence spending of all the countries increases if the defence spending of one country increases.
Incorrect. If you use the definite article, you need the context of a definite set. e.g.
In NATO, the defence spending of all the countries increases if the defence spending of one country increases.
I would suggest that "if the defence spending of a country increases" is wrong/unnatural, but I can't explain why. (And neither, it appears, can anyone else.) You can recast the sentence as: "If the defence spending of a country increases, the spending of its neighbours will follow suit", and this would be correct/natural.