Sharp pain in the side of face could be due to injury to a nerve or pinched nerve, an infection or a trauma. Hence it could be Trigeminal neuralgia
, abscess in tooth, exposed root canal, internal ear infection, maxillary sinusitis, TMJ, migraine, herpes (recurrent) without rash or fibromyalgia localized to face.
If the pain is due to TMJ, you will find it linked to either opening your mouth wide or to chewing. Also, touching the swelling on the joint aggravates the pain.