As an OCD specialty provider I think this is an important question to ask and understand. But many others may ask: "Why? Who cares what we call avoidance behaviors if we are avoiding, shouldn't we treat them the same way?"
The difference between a compulsion and avoidance is important because it could give us insight into what is really happening in your brain, and may guide the use of the most effective treatment strategies. Let me start outlining the difference between OCD and other anxiety disorders such as GAD. I have written about this previously and have a video explaining the difference as well. In short, OCD is "magical" in some way, where a worry or other anxiety generally is more rooted in facts or reality. Building from that, a compulsion is something we do to nullify an obsession, or a "magical" intrusive thought, whereas avoidance is simply the act of pulling away from a fear-inducing stimuli.
People with any anxiety disorder, including OCD, can avoid; but only people with OCD can do a compulsion, as they are doing something nonsensical to nullify a "magical" intrusive thought.
So, the distinction between a compulsion and avoidance is important because it can help us understand if someone is suffering from OCD or another anxiety disorder that looks like OCD, such as GAD. Once we understand the function of the compulsion or avoidance we can engage in therapy that is maximally helpful for that condition. If you would like to learn more about this please see my video here, contact an OCD/anxiety speciality therpist near you, or contact me at any point!