PANDAS can see that autism can happen at any time, in response to an illness. This research paper goes further linking any immune stressor to physically changing the brain chemistry/biology to improve your chances at living. You actually avoid human contact and wash more often - on a subconscious level. Manifest as ASD and OCD and others.
You have seen the opposite in mice infected with a parasite, who seem more attracted to cats, - https://www.nature.com/news/parasite-makes-mice-lose-fear-of-cats-permanently-1.13777
"The results are novel, as this sensitive and comprehensive testing has revealed how prenatal and early postnatal immune activation may regulate core behavioral signs associated with ASD and certain other developmental disorders through changes in signal flow between different structural components of behavior-driving neural circuits," said Bolshakov. "These findings may be of a significant translational value, as they provide important clues to understanding the mechanisms of these disorders and potentially their treatment."
You can't catch autism. That's a very faulty and dangerous idea.
Over-reacting immune system could be a factor, that much I accept, but that doesn't lead you straight to the cause of autism.
I think that there are many potential contributing factors to the development of autism, genetics especially, but you are very right to emphasise that autism can’t be caught!
So how does someone become autistic?