I’m 27 and have fibromyalgia, so have a lot of the problems you’re describing. When I first started knitting, the pain was intense because I was gripping the needles so hard and had my shoulders hunched up. Here are some things I find help a lot :
Every time I notice it, I relax my grip and relax my shoulders and try to knit from the position they go into.
Often, having a thick cushion on my lap to rest my hands on while I’m knitting helps because I’m not putting so much strain on my neck and shoulders by holding it up, and also the knitting itself is higher up so I don’t have to look down so far.
Taking a break every couple of rows, even just by resting my hands down still holding the knitting, and rotating my neck and shoulders means I can keep going for a lot longer.
I put tubigrips or wrist supports on when it’s bad just to give my wrists some extra support.
I see an osteopath every few weeks who puts all my bones back in the right places.
I’ve found that fibro and other arthritis illnesses can give you a fantastic understanding of anatomy. I am always amazed at how a sore wrist can end up giving me neck, shoulder and hip pain because each set of muscles pulls the next joint up out of place. The best thing I can tell you is to frequently rub the muscles in your arms to stop them pulling down on your neck - if you’re getting migraines it may be because muscle spasms are cutting off bloodflow to your brain - I often get migraines if my shoulders and neck are too tight. Also, take painkillers. The way we hold ourselves when we’re in pain is what leads to a lot of the problems later - I know a lot of people (me included) don’t like taking painkillers unless we really need them, but if you’re doing something physical, like knitting, then they help you prevent injury and long-term damage by keeping your muscles relaxed.
Some days, of course, I just can’t knit, and some days I can only knit a little and I have to put it down. It took me a while to learn when to stop, but I know, now, that if I don’t stop at that point, then I probably won’t be able to knit for a few days, whereas, if I just stopped, I’d probably be able to do some more later that day.