The lesion seems to be caused due to an insect bite...whether spider bite
or not cannot be said with authority.
It will be better to consult a Doctor as the presence of yellow end with purple surroundings indicate infection & pus formation.
It needs management with antibiotics, analgesics & anti histaminics.
Wishing a good health.
Thanks & take care.