Tactics are obviously vital.
So is Technology, INCLUDING Military "Science/Tactics/Strategy/Etc."
Training is vital, and, that is what is behind the celebrated Warriors, such as the Spartans, Samurai, Jannisaries, Legionairs,etc.
Then, you have factors like environment, weather, etc. The Desert peoples have always had more war, because their nations are often in "land seas." Meanwhile, people in Mountains can sit up there and hold off far superior forces.