They may occur anywhere on body but scalp, ears, back, face, and upper arm, are common sites
for sebaceous cysts. Blocked
sebaceous glands, swollen hair follicles and excessive testosterone production will cause such cysts.
Since it is under a mole, hence get it evaluated from 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.