Thank you for posting your query.
It seems You had some non infectious swelling like sabaceous cyst
,( a swelling occurs from the sabaceous gland of our skin due to retention of its secreyions).
It may occur in some individuals, harmless and can be removed only by surgery.
When it gets secondarily infected by some bacteria it will become painful
Antibiotics and letting out the pus will relieve the condition. So your Gynecologist or dermatologist
, and they will help you. It is not due to STD
Get well soon.