No.Are you saying that religion evolved to promote social cohesion but after it evolved the function of promoting social cohesion disappeared from religion?
I'm saying the value/need of social cohesion depends to a certain extent on the times. Times of fear/scarcity/problems are more likely to lead to a societal breakdown. Times of plenty/peace are less likely to lead to societal breakdown.
It still seems to be a primary element of religion, and I suspect it always will. But this need is more in demand in some places than others. Highly educated societies with more comfort and resources, and less internal violence and strife, seem to have significantly reduced religious rates, on average. If you look at a map of irreligion, it largely aligns with economics and the human development index in general, with a notable exception for China and what was once the USSR.
Irreligion - Wikipedia, the free encyclopedia
You'll see irreligion most prevalent in Europe, and particularly northern Europe. It's also highly prevalent in eastern Europe and China (probably highest in China), which had a massive effect from strict anti-religion policies and temporary cultures. Places like North America and parts of South America are moderate. Africa, the Middle East, and Southeast Asia are more religious.
It's also worthwhile to measure religious adherence over time in the same place.