Many autistic people have been potentially misdiagnosed with OCD ("Obsessive Compulsive Disorder") during their lives.
It does not help that autism is often described as having 'obsessive' behaviour. Let's look at that, first.
Autistic people may become extreme specialists. Thank goodness for that. Society needs extreme specialists. People who test things to destruction to make sure they work first time, every time. People who become world experts in a topic. People who have fine-tuned senses of hearing, sight, touch, taste etc, until they can detect the smallest hints of danger for a community. These are not obsessions. They are passionate interests with amazing focus.
Autistic people may also use repetitive movement to be able to find our bodies. To know where they are, in relation to other things. Some use repetitive flapping of hands or fingers in front of eyesight, to help them judge distance to objects. These are not obsessions, they are adaptations to cope with sensory difference.
Autistic people may well collect things and put them in specific orders. Testing logic, shape, pattern. This is not obsession. This could be art. It could be science.
With OCD, it's about fear.
"If I don't re-test whether the door is shut, there could be disaster."
"If I don't wash my hands, there could be germs, and that could be disaster."
"If I step on the cracks, I could die."
"I might harm someone. Suppose I do? It doesn't make sense, and I don't want to, but suppose I do? Oh my goodness, suppose I do?"
"What happens if I haven't written something polite and it's actually insulting. I'd better re-check. Again. And again. And again. And again. Oh goodness me, just supposing it's wrong. I'd better check, again. And again."
It's terrible sickening fear.
The two are not the same.
One is adaptive, often a source of immense joy/pleased focus and increased sense of security.
The other is immensely damaging and exhausting, and not something anyone would want.
A person could be autistic, and have OCD. But people need to be careful, as professionals, not to confuse the two.
Good questions, and good observations, are important. Because treating autistic people with techniques and medication designed for OCD is not a good thing.