intrusive sinful thoughts are from demons. there are many. just say a hail mary or something you like it goes away. really it does. don't believe me? try it. if it's something gross/lewd etc it's from a demon most likey. if you pray it 100% goes away.
also why i think mental health "science" is nonsense. seriously even if it's really bad pray for an hour, i don't think there's anyone(any demon) who can withstand an hour of prayer. no joke it really goes away you don't feel any of it. it's sad the church seems to have acquiesced to muh mental illness. i'm like 95% sure there is no such things, just demons playing with people and people accepting it.
pray bro/sis, it will definitely fix it (i had issues like this before and prayer would stop it, they basically gave up). God bless you!