Meditation is a great support for building better mental health and fitness. It can help you develop skills that are useful when overcoming OCD–like learning how to feel things with judgment, improving your ability to pay attention, keeping your mind present without running off to catastrophise about the future or ruminate on the past, etc. All of those will help you with cutting out compulsions and changing how you relate to the stuff in your head. But you still have to do that work. Meditation is not a replacement for the healthy changes you need to make. It’s not a quick fix.
You can meditate and engage in compulsions and keep practicing OCD and making it worse. You can approach meditation in a way that’s very symptomatic of OCD, just like you can bring your OCD practice into anything, like exercise or eating. Practice meditation in a healthy way and it will be healthy for you. Practice meditation as an attempt to avoid something you’re afraid of, and you’ll find more of that thing which frightens you.