I occasionally have neck issues. I assume it is bad posture. I do some simple exercises for a few days and it goes away for a few months.
Tilt forward and back, 10 times, left to right. Then head rolls.
Tilt forward and back, 10 times, left to right. Then head rolls.