Has anyone ever had unwanted intrusive thoughts?

I keep having horrible thoughts that scare the heck out of me. I was crying & praying for them to go away. I don’t know why this happens. Idk because it’s lack of sleep or bc of sadness. Idk... posting anonymous bc I’m embarrassed of this