As grobick2000 says, you don't describe any risk. Hand to vagina and then hand to penis is not going to transmit the virus. You masturbated. That's it. Your anxiety is getting your brain in trouble overthinking. Anxiety works by feeding it. If you test, you have fed it. Your anxiety will remain in tact. If you accept no risk and don't test, you won and your anxiety will ultimately fade and bother you less.
Greetings.
You had no risk and you shouldn't be worried about STIs.
Okay, here we go again: any hand touch of to your penis aka "The Touch of Death" is very safe. It doesn't matter much whose hand it is and what this hand had touched before. It doesn't matter if the touching hand in question was dry or wet. We are no longer in 1923 and CSWs with active syphilis are extremely rare in most parts of the world.
You don't need to test for anything, you don't need even think about the "touching" encounter. If you keep thinking about it, it will feed your anxiety and will lead to serious psychological damage.
I also want to saym she touch her vagina alot before she touch med penis