Thanks for writing,
it seems that you might have enlarged lymph node
in the neck due to some infection on the scalp
or surrounding region.
Find out the lesion like boil,bruise
in the area.
If you find then go for short antibiotic medicine and anti inflammatory medicines.
It is also possible that you might got some muscle strain
of the neck muscles.
ok and bye.