I used to suffer from Religious OCD, like I feel if I have any kind of bad thoughts I would forget academics due to punishment from God, I kinda feel I did. During a interval of time I wouldn't be able to do basic math and would not remember academics stuff. Due to OCD do I actually forget stuff or is it just in my head?

To cope up I used to think of stuffs I used to like, like cars, movies, songs etc and this vastly improved my mental state but I just wanted to know if these side effects like forgetting is real or its just something I have in my head etc. 

Please clarify

Thanks in advance