The main focus of OCD can be religion, especially for individuals from very fundamentalist backgrounds or for people with religions that have a lot of rules and rituals, such as Catholicism.
Religiously focused OCD is actually common enough that it has earned its own subcategory from professionals: scrupulosity, from the root word “scruple,” which means to show reluctance based on conscience.
Individuals with scrupulosity are often plagued with the idea that they have offended their god and will face eternal damnation if they do not somehow make amends for their transgressions.
Or they fear that they are damned and that there is nothing that they can do about it, though they keep trying to figure out something to help their fate. This is similar to the mythical story of Sisyphus, who was condemned by Zeus to roll a large marble boulder up a hill, only to see it fall back to the bottom just as he was about to get it to the top. Though he knew that it was going to fall, he was condemned to do this for all eternity.
Individuals with scrupulosity often feel like Sisyphus, in that they are condemned by their OCD to a life of obsessions and compulsions. They are disgusted with themselves for having the OCD thoughts, and then they become angry at their god for their having OCD, and they then fear that they have offended their god even more for being angry at him or her, and so on.
Luckily, a treatment called Cognitive Behavioral Therapy (CBT) works very well for scrupulosity.