Hello,
Thank you for the question.
Genital herpes is caused by the
Herpes simplex virus (HSV).
You get the infection from skin to skin (direct) contact with a person infected with herpes (person infecting you can either have active HSV with sores or dormant HSV without any symptoms).
The virus has property of remaining dormant in your nerves and some people have the virus in the dormant stage from the very beginning without ever exhibiting the symptoms(having an acute attack).
But once your experience a stress (in your case
hysterectomy) , it can lead to activation of virus and you will develop symptoms. So you actually did not contract herpes due to Hysterectomy, but the stress of surgery activated the dormant virus in your system.
The only way to confirm HSV is lab test which look for the viral RNA or a Tczank smear. Meanwhile, while waiting for test results your doctor must have started you on the
antiviral medication Acyclovir , If not I suggest that you discuss with your doctor.I would also recommend getting tested for other sexually transmitted infections.
Hope I was able to answer your question.
Please feel free to address any more questions or concerns.