First, it may be a bad habit. If corrected, it will improve.
Second, it may be cervical spondylosis. See a doctor for treatment.
If you want to change this problem without receiving medical care or medical facilities.
Yes, stand against the wall as far as possible, with your calves, hips and shoulders against the wall and your head against the wall. It is advisable to 15 minutes.
Slowly improve, just stick to it for a while.