Hi and welcome to HCM.
It sounds like foliculitis and you can treat it by antibiotics and local treatment or by surgically procedure. YOu should keep this area clean,shaved and dry. This is commonly found and usually pass in a week. If last for longer then some other infection such as herpes
should be considered.
For shaving try to use new razors or automatic shavers. WIsh you good health.