If it is not the above reasons, it may be that I accidentally twisted it during exercise.
You must do some warm-up exercises before exercise, and only after opening ligaments and joints can you increase the amount of exercise, otherwise you will easily encounter strain and sprain.
If you have similar symptoms, you can apply a hot towel to the wound to relieve the pain and twist your neck properly. If the pain is not relieved, you can apply some plaster or safflower oil, which is very effective.