New optometrist changed myopia prescription to astigmatism prescription and have had a migraine ever since. My old glasses don't do that. What happened?

Go back to optom. Glasses are sometimes made incorrectly. Other times the refraction (measurements) are done incorrectly. You shouldn't be having headaches from a prescription which is supposedly 'better' than the old one. Go back to the optometrist.
Takes time to adjust. To the new RX, but this will never happen if you always go back to your old glasses. It would be worth having the glasses rechecked.