There might have been muscle spasm in cervical muscles.. may be due to abnormal posture while doing work from home..
Next Steps
Start with hot fomentation, analgesic with muscle relaxant, local analgesic ointment. you may continue using your pillow..
Health Tips
Avoid abnormal posture while working from home, use table and chair..