It's possible to get really deep on this subject. I'm going to get really superficial. However, anyone who comments is welcome to make it deeper and I'll join you.
If you're in any way religious, you'll be familiar with people saying religion is bad because it causes wars. Well, yes, it does cause some wars. Anything about which people feel passionately is likely to cause some conflicts. It also stops or prevents some wars.
As a History graduate who's maintained my interest in the subject, I've come across huge numbers of wars going from ancient Egypt and Babylon to modern America, Russia and China. If I try to categorise the main causes of those wars (and of course there will be some disputable cases), it appears to me the main cause of wars is land - disputes over ownership of or greed for land. If I set out a table of the causes from the commonest down, it goes like this:
2: Other resources (gold, oil, control of a vital trade route etc)
3: Political advantage (for example, a tottering regime may start a war in the hope that victory may rescue its political fortunes back home, and in a society where victorious generals often achieve political power at home, such as ancient Rome, ambitious generals may start wars. This could also be applied to situations where a neighbouring country is harbouring rebels or dissidents who are a threat to the regime and to the situation not uncommon up to the 18th century where there is a disputed succession to the throne of country A: perhaps Smith gets the upper hand but neighbouring country B supports Jones, that leads to war and then maybe country C supports Smith)
4: National pride and status (we like to hear our armies have been victorious; the land we're conquering may be useless, but it makes the empire look bigger on maps - would also cover wars caused by insults)
6: Religion and other issues of belief
7: Giving the army something to do, since bored generals and bored common soldiers can both be dangerous in states without a strong tradition of the military staying out of politics.
I considered a category of "flexing muscles", where a strong country is showing off its power to others, but it seemed to me the motive then is probably 2, 3 or 4, depending on what the weaker countries are supposed to do when they've seen that power demonstrated.
I've excluded civil wars from that, and belief (but not necessarily religious belief) would be a stronger factor in many of those. However, many civil wars are arguably class wars (not in a Marxist sense necessarily), which comes down to a dispute over resources, whether wealth or power.
Of course those pursuing wars (whether aggressors or victims or 6/6 cases) generally invoke religion in their support. Even the officially atheist Soviet Union encouraged a revival of Orthodox religion in the Second World War bcause it was seen as strengthening people's will to resist and it put the war in the context of other Russian struggles against invaders of different beliefs. That does not make religion the cause of the war, and since the 20th century many of the voices raised against wars have come from religious groups.