Do I need to quit violin for health reasons?

I went to the doctor a few days ago because of excruciating neck and shoulder pain. It especially hurts when I practice violin. The X-ray showed my neck as an S-shape and leaning forward.

My last back X-ray was a few years ago, and it didn't show this. I started violin three years ago. The doctor asked a lot of questions about my hobby: how long I practice violin and how often. He seemed concerned. I have to do physical therapy for several weeks until I'm better, he said.

I changed violin teachers two months ago, and my new teacher, who I like much better, had to correct my posture and other things in the beginning. I wonder if this was caused by poor posture from before.

It really saddens me because ever since I saw my X-ray, I haven't practiced. I'm too scared. Idk if physical therapy will straighten my neck. (I'll ask him next week.)

Do I really have to consider quitting violin?