There was something something called the secularization thesis. I don't recall who exactly constructed it, but social theorists such as Marx, Durkheim, and Weber theorized that as society modernized, the authority and practices of religion would dimish.
Though... They made a huge miscalculation.
In the Western world, religion is on the decline. In other parts of the world... Not so much. They coined this as the resecularization thesis. Religion isn't going anywhere.