The question, "Is exercise good for OCD?" is one I hear often.
Let's start with the first piece:
"Is exercise good?". We know the answer to that. Of course it is! Exercise is great for your physical and mental health, for many reasons.
As for anxiety, exercise can reduce "stress". And stress can increase or trigger anxiety. So, exercise can indirectly reduce some general anxiety.
However, exercise cannot and will not decrease obsessions or compulsions. These symptoms of OCD require specific CBT (Cognitive Behavioral Therapy) strategies to overcome them.
The neurobiological causes of OCD notwithstanding, it makes logical sense that exercise cannot reduce these symptoms of OCD. Simply put, exercise (this includes yoga too) cannot resolve obsessions or specific fears related to obsessive thought. For that matter, exercise (again, this includes yoga too) cannot resolve panic attacks or phobias either.
The only successful method for decreasing fear and overcoming it is to face it. Regarding CBT for obsessions and compulsions, the work is done gradually. Small steps build confidence while helping the brain adapt to fear.
All of the above is not meant to say that exercise will be of no benefit to those with OCD. Consistent exercise can be empowering for the fear-facing journey ahead. And as stated, it can reduce stress, which when left unchecked, can increase OCD symptoms.
So, by all means, get some exercise! But if you struggle with OCD, panic attacks or panic disorder and phobias, don't waste your time hoping exercise will resolve your symptoms.