Religion is brainwashing in order to socially control the masses.
More people started graduating high school, then college/university. This means more people know science, and critical thinking, and read books.
Education and critical thinking is destroying religion. If you think the world is 4000 years old and believe in Adam and Eve you lack education.