I believe that the countries that were able to adapt under these difficult circumstances and reduce the damage and losses are the countries that possess the strongest intelligence capabilities. In other words, what you mentioned about the aforementioned agencies is correct, but those countries are basically strong and dominate the general position of the world. But what do weak and medium-power countries do? If they are able to avoid losses and damage, then they are strong in terms of intelligence.
Why do humans spend billions to improve the lives of their people, improving health quality, and developing infrastructure only to end up washing it up in war due to little misunderstanding they could settle by dialogue?
You're right. Humans do spend billions to improve their welfare and longevity, only to end up in warfare. However, when it comes to issues like war, there aren't many countries like America where you have a choice, and even in America, that choice has a loophole. Suppose the military doesn't meet the War Department Homeland Security quota enrollment, which will be enough to protect the country of the U.S. In that case, they issue a mandated draft, which all males must legally register when they turn 18 years old. These young men are already on roll call until age 35-42. You can enlist volunteers between the ages of 35 and 40, but they don't like to recruit anyone over 39.
Other countries, when they go to war, they don't have a choice, they either comply or go to prison, or worse, face a firing squad. Regardless of what everyone thinks at this time and day, freedom is not "FREE!" It only means the system has loosened the chains to allow us room to breathe and make decisions with limitations still according to their laws and policies. We also have to look at it from a political point of view too. Men in power all have the same thing in common, they wear a God complex and are highly narcissistic. People are pawns on a chess board to maneuver and control at their will.