Religion is a subset of ideology, and ideology is a set of beliefs about how how the world is and how the world should be. Capitalism is an ideology. Communism is an ideology. Scientism is an ideology. Christianity, Islam, Buddhism, Hinduism, Sikhism and so on are religious ideologies.
The boundary between the two is weak. Communism and Scientism make metaphysical statements. Communism and Scientism generally state that there is no soul, there is no afterlife and there are no supernatural beings.
Capitalism believes that people, out of self interest (greed and selfishness), act in ways that create welfare for the majority. This is a radical belief, held by almost no one and no other belief system in history. It also believes in unlimited growth. The combination of these beliefs is going to wind up killing a few billion people.
But the worst religious belief is almost certainly “there is an afterlife, and only thru this religion can you achieve it. If you don’t worship this religion you will be tormented for eternity after death.”
This belief creates monsters. If there is only one way to avoid eternal torment, then ANYTHING is justified. This is one reason why Christianity and Islam have a history of atrocities. Charlemagne, a hero to most in the West, spent much of his life force-converting “pagans.” In one case he forced ten thousand Saxons to accept baptism, then immediately killed them all. Had they lived, after all, they could have gone to their priestly class and un-converted.
The mass burnings in the New World, primarily by Spain, were justified by the belief that burning pagans would let them get into Heaven. Sure, burning alive is one of the most horrible deaths possible, but what’s that compared to an eternity of torment? Burning someone alive to avoid Hell and get them into Heaven isn’t just not evil, it’s a truly good and moral act: to not burn them would be evil. If there’s something you can do to ensure you or someone else avoids eternal torment, it’s always justified.
This is the most extreme of “only my way is the good way” beliefs common in ideology. We’ll discuss this in more general terms later. It isn’t always wrong to say “some actions and beliefs and ideologies are good and others are evil”, it is always wrong to say “only this set of beliefs is right and all other sets of beliefs are wrong.”
The distinction is fine, but important. It’s also one that many moderns reject.