Hi there ~
You most probably had a viral infection from unclean shaving practices. It was probably a viral skin infection
called Molluscum Contagiosum
. I hope you have been feeling better since then. If you are not please visit with a dermatologist
to get the right medications. I do not think it is herpes. However to relieve your anxiety
, please get an HSV test done for yourself and your partner. I hope this helps.
Take care and have a lovely day!