As others have mentioned, there are lots of genetic links between the two. So a lot of Autistic ppl would also have ADHD (as well as a bunch of other interesting neurodivergent traits), but it is definitely not guaranteed. I am actually such an example... I have diagnosed ASD lvl 1 & have some ADHD-esque traits, but I do not meet the diagnostic criteria & thus do not have ADHD
To add to this discussion... unfortunately there aren't good ways to tell if one has ADHD except for consulting a psychiatrist. It's probably a good idea to not rely on self-diagnosis too, since ADHD does have medical interventions, but a good number of them are controlled substances and probably realllly shouldn't be taken by just about anyone
My hope is... I think most psychiatrists know the strong relations, so hopefully a good psych would have at the minimum also checked for ADHD while diagnosing for Autism...? Although to be honest, my first psych didn't do it either. I later went for a separate comprehensive psych eval for ADHD+others, which did just about everything under the sun... (ASD, ADHD, anxiety, IQ, psychopathy, aphantasia, alexythymia, reaction speed, ...)