Well, if your girl has genital herpes and spits onto her hand, that doesn't give you genital herpes through that spit. There are two types of herpes. There is HSV 1 or oral herpes and that involves the mouth. Cold sores are the typical sign of that. Then there is HSV 2 which is genital herpes. Did she touch her genitals with her hand? That would be the way that she could give you HSV 2 through a hand job.
Hands don't transmit STDs. Even if she touched her genitals, then touched you, you wouldn't get genital herpes from her, or any other STD.
If the handjob was pretty long and vigorous, perhaps you were just irritated. Instead of spit, you should try some actual lube. You can get KY Jelly and others at any drug store, no matter what your age is. It feels a lot better than spit. Places like Planned Parenthood and STD clinics usually give it away, too, but they are small samples.
Does your girlfriend know which type of herpes she has genitally? You can have genital hsv1, which happens if someone with oral hsv1 performs oral sex on someone, and genital hsv2, which is transmitted by genital to genital sex.
It matters because transmission rates are different. Have you ever been tested? If she has ghsv1, and you have ohsv1, you can't get anything from her (though the chances of her ever transmitting ghsv1 are very slim anyway).
These are the transmission rates for ghsv2, female to male, over the course of a year, assuming sex 2-3 times a week:
Only avoiding sex during an outbreak - 4-5%
Adding condoms OR daily suppression - 2-3%
Adding condoms AND daily suppression - 1-2%
Daily suppression is taking a medication like Valtrex or acyclovir every day.
So if she doesn't know what type she has, she can ask her doctor for a type specific IgG blood test. That's what you should ask for, as well. Make sure it's an IgG test, not an IgM test.
If you don't have a doctor, you can get it done here - https://www.stdcheck.com/herpes-i-ii-test.php It's expensive, though, and you have to self-pay. Insurance doesn't cover it. (If you aren't in the US, it can be harder to get the IgG, but let me know what country you're in. I have some resources for some countries.)