ERP is the gold-standard treatment for OCD. Rather than trying to suppress or reason with obsessive thoughts, ERP works by gradually and intentionally exposing you to what triggers your anxiety and then noticing what it feels like to avoid the ritual or compulsion. Over time, your brain learns that the feared outcome does not require the compulsion to be prevented, and the anxiety loses its grip.
ERP is hard work, but it also allows you to get time back that you would otherwise spend on rituals.