Sounds like you have both autism and OCD (same here). I'm going to focus on the OCD traits you're describing because I've found that part of my condition to be a lot more treatable.
A lot of people are suggesting SSRIs, and those are a valid option you can consider, but I was personally too concerned by the side-effects. They blunt negative emotions but they also blunt positive emotions too. I'm also aware of cases where people have had side-effects even years after coming off them. Look up Post-SSRI Sexual Dysfunction. You can also experience anhedonia, which is a complete loss of joy and pleasure. But don't write it off completely. There are lots of people who will tell you it helps them and don't regret it.
This is not something I would necessarily recommend, as I don't believe it's healthy to dependent on any drug, but what helped me was actually nicotine. I found that when I started using it my obsessive thoughts became a lot more manageable. Nicotine has a really bad reputation because people associate it with cigarettes and all the health problems they cause. These issues are caused by smoking tobacco, not by the substance itself.
The physical health risks for the methods I'm using for ingesting it (vapes and nicotine pouches like Zyns) are safe enough that I'm happy with the trade-off. But, with all that said, if you try to quit your anxiety will be significantly worse than it was before you started, so think very carefully if this is an option you want to pursue. I've accepted at this point that I'm going to be a life-long addict. If that sentence scares you, don't try it. You're (hopefully) an adult and are in charge of your own medical decisions.
Conversely, if you consume a lot of caffeine, cut back on it. If you drink energy drinks, start drinking coffee instead.
What I would definitely recommend you look into is Cognitive Behavioural Therapy. That helped me massively, and if you find it doesn't work for you then no harm done.
I don't know anything about your life, but do you have a job (or more specifically, one where you aren't working from home)? Do you actively go out and do things in the real world? I found my OCD was at its worst when I was a homebody, because I had nothing to distract myself from my own thoughts.
It also made it really easy to fall into an Internet addiction (which was exacerbated by the fact a lot of my OCD obsessions were tied into security and privacy - I became obsessed with the idea of being spied on). Which created this situation were the Internet was paradoxically both my main form of escape and the main source of my anxiety.
If that last sentence in any way resonates with you, this helped for me: I ended up having to "detox" for a while by imposing a rule on myself that I could only use the Internet outside of my own home. I'd go to a library or a café for a couple of hours. It got me into the real world and also made it easier to deal with being bored when I was at home. I only did this for a couple of months but it worked wonders for getting me "out of my own head".
None of the things I'm suggesting may be applicable to you, I can only suggest what worked for me. But in any case, good luck. It's a fucker of a mental illness to deal with.