FWIW, depending on severity, OCD can interfere with attention and EF.

If this is a newer development, you might also consider the can of worms that is PANS/PANDAS, whereby inflammation (whether autoimmune and/or infectious) is thought to be at the root of the OCD/anxiety. It is controversial and the exact mechanism is not well understood.