I have pain when I yawn. As if my windpipe closes. A knot I feel every time it happens. What is happining?

Doctor to evaluate. If something is in the throat or neck, an ear-nose-throat doctor and a gastroenterologist can evaluate. The doctors can decide if, after an exam, x-rays or other imaging studies are needed to look for something. Sometimes, nothing can be found at the present time, but rechecking later may locate a problem, especially if the problem has grown big enough to show up.
Yawning Pain. The yawning reflex uses a number of muscles in the face, neck, and throat. You may have a muscles spasm in one of these muscles, which may also be the knot. See your doctor to make sure this is a benign issue.