First, you need to be able to recognize that thought as not being your own, and to differentiate your thoughts between your intrusive ones, and to accept that they are spontaneous and will happen again! The more you try to push the thought away the more it will fester, engaging with your thoughts or trying to figure out what it "means" only gives more power to it. The thoughts aren't a reality and writing down that thought, embracing it, and then counteracting it with truths was something that really helped me. It’s good to realize that the thoughts will come back because the more fear you place into it, the more power it will have over you. So, I’d say just take time to pick [each thought] apart and have faith in yourself. These thoughts have no control unless you believe there's a truth behind it, and there isn't! Writing and doodling my thoughts honestly is what helped me so much with this.
-𝒘𝒐𝒓𝒅𝒔 𝒃𝒚 𝑻𝒂𝒍𝒊𝒂 𝑪𝒍𝒂𝒖𝒅𝒊𝒐