From your description it seems like a masticatory muscle spasm. Generally heals by itself if you give it rest.
For few days:-
Take soft diet. Don't chew anything hard.
Don't press on the site to check for pain.
While yawning try to support your lower jaw with your palm to avoid stretching of the muscle.
Next Steps
If there is no change in a week please consult your dentist for further investigation to rule out any jaw joint problem, nerve issues or any unusual swelling/ growth.
Health Tips
warm saline rinse thrice daily.