Hi! Your description of the pain in the nape of the neck, is very typical pain arising from the spine. There are many causes that can lead to this. Given your age , the most probable cause is disc degeneration which starts in the 30s. An international award winning scientific research study we did in India revealed that by 30 years of age , 30 percent people start developing disc degeneration and a handful become symptomatic with neck pain, on and off type. Don't worry much, this is very coming and simple ergonomic correction will help you a lot. When you use your cell phone, Do not lower your head to the phone , instead lift your phone to the level of your eyes. Do the same with your laptop. Also visit a physiotherapist for isometric neck strengthening exercises. Read about text neck syndrome. Apply a warm cloth to your neck thrice a day for fifteen mins and a pain gel also.
Next Steps
If the pain persists after 5 days do visit a spine specialist for an X-ray to rule out other possible issues.
Health Tips
Strain your neck less. Avoid flexed positions of the neck. Best of luck !