There is a couple of tests to detect ASD. The test used varies depending on age.The link below will take you to the Childhood Autism Spectrum Test (CAST) developed by the Autism Research Center at the University of Cambridge.
https://psychology-tools.com/cast
There is a modified test (M-CHAT-R) for toddlers.
With adults the Autism Spectrum Quotient (AQ) can be used.