Posture is the usual suspect. Prolonged sitting, a forward head position pulled toward a screen, long drives, and the slow forward creep that comes with desk work all load the neck in ways it was not built for. The muscles at the base of the skull and across the upper shoulders end up doing the work the deeper neck stabilizers should be doing, and they get tired and sore.
Sleep is the next one. A pillow that is too tall, too flat, or just wrong for how you sleep can leave you waking up "wrong" — stiff on one side, headachy, unable to turn your head. Stress lives in the upper trapezius and the suboccipital muscles, and a hard week shows up as a tight neck and a headache that builds through the afternoon. Repetitive strain from looking down at phones, overhead reaching, or the same lift over and over adds its share.
The pattern is usually the slow build: small daily strains stacking up over months until the neck "suddenly" hurts. Sometimes, though, neck pain has a more specific cause that needs evaluation — a disc, a nerve, an inflammatory issue — and that is exactly why a real exam matters before assuming it is just posture.