This exploratory trial will have three parts. Part A is a dose escalation part, Part B is an expanded safety and dose evaluation part, and Part C is a safety and immunogenicity evaluation part in individuals with recurrent HSV-2 genital herpes. Part A will focus on the safety evaluations, and in addition, vaccine-induced immune responses (specifically neutralizing antibodies) will also be analyzed to assess if there is a dose-response. Part B of the trial will expand the safety characterization for two dose levels of BNT163 selected based on Part A data and will also enable a more comprehensive assessment of the impact of pre-existing immunity to HSV-1 and -2 on the safety and immune responses to BNT163. Part C will evaluate safety and immunogenicity of BNT163 compared to a placebo in a three-dose regimen in participants with a history of HSV-2 recurrent genital herpes.