Thank you for your question.
Can you move it or it seems fixed to the underlying bone?
Is it painful or red colored or any swelling around?
Please provide more informtion
Most common an most probable cause of such swelling on scalp is sebaceous cyst.
It is basically oil gland which can not longer out pour its oily secretions because of blockage in its duct opening.
It is not infection unless it becomes red, swollen and painful .
It is not harmful or dangerous immediately as well if cosmetic appearance is not concern and it can be removed or just observed .
At your convenience, you can get it checked by local physician to make sure about its diagnosis.
sometimes underlying skull bone projection like growth might also be the cause .
Just observe it. if it gets enlarged or painful, get it checked by your local doctor.