One of the things that we find to be such an important element of many of the rituals and practices that people do as part of their religious traditions is the repetition of it. The more that you come back to a particular idea, the more you focus on it, the more you say a phrase or a prayer, those are the ideas and beliefs that become written into the neural connections of the brain.
There is a cute saying the neurons that fire together wire together. The idea is that when you are doing a particular practice, whatever it is religious or otherwise, the more you do it the more you are writing that information into the neural connections of the brain. The neurons that support that idea or support that practice fire together. They strengthen their connections and it makes it easier for you to come back to that particular practice and it also strengthens the beliefs that are around that particular practice.