When I touch my eye when my eyes are closed my eye feels sore?

Nonspecific symptom. Need more information to answer.
Dry eye. There are many treatments for dry eye. First line treatments include artificial tears during the day, ointment at night, warm compresses 1-2 times a day, and omega-3 fatty acid supplements. If no improvement or worsening, you should see an eye doctor to consider other prescription therapy. Other issues can cause similar symptoms so if worsening symptoms, call your eye doctor.