If the menstral blood accidentaly leaks from her underwear and came contact with my penis head will it transmit hiv?
You had no risk of HIV because you can't get HIV from touching it outside the anus or vagina. You are so safe that you don't even need to test.
HIV is instantly inactivated in air which means it is effectively dead so it can't infect from touching it. It doesn't matter if you and they were actively bleeding at the time either because the HIV is effectively dead.
Only adult risks are unprotected penetrating vaginal or anal sex or sharing needles that you inject with but you didn't do that so you had no risk. This sentence is all you need to know to protect yourself against HIV.
Even with blood, lactation cuts, rashes, burns etc air and saliva do not allow inactivated virus to infect from touching it outside the anus or vagina. The above HIV science is 40 years old and very well established so nothing you can add will make your situation a risk.
If it was as easy to catch as you worry, then everyone in America would have it from touching the wrong person or their clothes etc.