The shift happened in Catholic countries first. France in particular shifted away from religion in the 18th century, so did southern Germany and Austria after the 30 years war. Protestant Germany remained largely Christian until the 19th century, the same can be said for Britain and The Netherlands.
The only countries today where any form of the Christian faith is strong is Poland, Ireland and Northern Ireland. Unfortunately these countries have largely stuck with the faith for political reasons. As those political reasons die away, so does the Christian faith. Which of course means their faith isn’t very strong and is little more than an extension of political views.
France remained heavily Catholic through the end of the 19th century. The anti-religious elements of the Revolution were largely imposed on a still mostly rural and religious populace by the people of Paris.
The Commune was crushed the next time they tried this.
It would have made some sense for southern Germany and Austria to go anti-religious after the 30 Years War, but I have never seen any evidence they did.
I think you’re confusing elite and literate opinion with the people. For a century or so it was fashionable to be anticlerical in these countries, but even these folks were largely scared back into the Church fold by the Revolution. The peasants, most of the population, never left.
As an example, Austria was still heavily Catholic in the 30s, when a Catholic dictator ruled until dethroned by the Nazis. Same was true in Bavaria, where the Center Party, explicitly Catholic, was utterly dominant until the Nazis took over.
BTW, my comments here are with regard to Christian faith as THE organizing principle of society, not individual faith.
To my mind, the plural nature of Protestantism meant that this faded earlier in Protestant countries. Lasted longer in many if not most Catholic areas, but when it do go, the change was faster.