Inability to yawn due to ear pain?

Jaw pain. Hello, i would first think of tmj. The jaw joint may become inflamed and benefit from otc ibuprophen. I usually have patients use this as directed for 10 days. Also avoid repetitive jaw motion like gum chewing. See your doctor for confirmation. Physical therapy and possibly a dental splint while sleeping may help.
Ear Pain. With yawning could be related to the stretching of your mandible. Ask your dentist to review your TMJ which is a joint in front of your ear. All the best.