When you are stressed or anxious, your body tends to tense muscles as part of the fight-or-flight response. Held over time, this tension commonly causes aching and tightness in the neck, shoulders, jaw, and back. Poor sleep, shallow breathing, and reduced activity that often accompany stress can add to the problem, and tension headaches frequently go along with it.
This pain is genuine, not imagined, and it can become a cycle, where pain increases stress and stress increases pain. Relaxation techniques, regular gentle exercise, good sleep habits, and addressing the underlying stress can all help break that cycle.
While stress is a common contributor, it should not be assumed to be the only cause. See a doctor if pain is severe, persistent, one-sided, or comes with other symptoms such as numbness, weakness, weight loss, or fever, so that other causes can be ruled out. Support for anxiety and stress is also available and worth discussing with a clinician.