Does this sound more like Anxiety or OCD?

I basically have the issue of ruminating over past mistakes and/or overthinking it and what it means about me and what my intentions were, like I know my intentions were this, but my mind comes up with some untrue crap. And then my mind gets stuck on it. Then I get over that one and then my mind starts on another past action/mistake and then I get anxious all over again over that one to.

For example, one time, I was looking at cartoon porn, and one of the images was of a child, I wasn’t attracted to it, but the fact that I even looked at the photo causes me to ruminate.

The ruminating about certain events also causes me to sometimes think irrational things like I was attracted to that child, for example.