Think about a petri dish and how bacteria grow on it until they saturate the entire surface area and then the resources run out, unless half of the bacteria destroy the other half, and then they can survive longer. War is the result of humans fighting over the metaphorical petri dish of land, resources, and also power. From this high level perspective, humans go through periods of growth, tension, war, and then the winner gets to continue surviving, only to repeat the cycle eventually.
Unless we discover infinite energy and resources somehow, we are going to be forced to clash in this way, and the ultimate way to resolve these conflicts is war. That said, we can have long periods without it because we discover new technologies that alleviate these tensions for some time, but I think a great war will be inevitable, the question is how long will our current peace streak last?