Welcome to healthcare magic!
The pain in neck can be due to pulled muscle as you have thought but there are other causes also like osteoathritis and rheumatoid arthritis
involvement of neck vertebral
It can be due to infection of brain when you have headache associted with neck stiffness
It is highly advisable that you undergo a neurological examination and an Xray cervical spine
Get treated according to exact etiology.
I hope you would get benefitted from my advise.
Wish you a good health.