From the symptoms cysts like pilar cysts need to be ruled out. Pilar cysts manifest as smooth, mobile, asymptomatic swellings, often in the scalp. Overlying hair loss may be noted. The definitive treatment is surgical excision of the cyst. My sincere advice would be to consult a dermatologist.
It is very difficult to precisely confirm a diagnosis without examination and investigations and the answer is based on the medical information provided. For exact diagnosis, you are requested to consult your doctor. I sincerely hope that helps. Take care and please do keep me posted on how you are doing.