There is no way to be sure. The closest to certainty you can get is a professional diagnosis, but you will find room for doubt even then.
You can take tests online, but they are probably best as a first test of whether you should pursue a professional diagnosis.
If you need to know, a professional is the only way.
Do you need to know? Can you just live with the self knowledge you already have?
You must have some deficits in social communication, some repetitive movements or restricted interests, etc. if you are wondering if you might be autistic. The question is what can you do with this information and will a diagnosis be helpful to you in some way?
If you need it, you have to see a professional. If you don't need it, you can start with the knowledge that you have these symptoms and strategize on ways to compensate for them so their negative impact on your life is minimized, in so far as possible.
Either way, good luck to you.