The main reason is that the upper trapezius, levator scapulae and scalene muscles are too nervous, so the cervical vertebra is pulled forward.
Relaxation method: massage the shoulder and neck muscles and stretch the above muscles.
Stretch your left side, hold your chest and abdomen, sit in a sitting position, sit with your left palm up under your ass, look forward, straighten your neck, hold your head with your right hand, and stretch to the right. The description may be unclear, so you can search for the stretching method of "Upper Cross Syndrome" yourself.
In short, the neck leaning forward is caused by unbalanced muscle development, as long as the tense muscles are stretched and relaxed.
This personal fitness trainer belongs to "posture correction" in our training. Many people have this problem, which is relatively easy to correct. If you have the conditions, you can go to the gym and find a coach to teach you how to do it.