Yes getting a headache when wearing new glasses for the first time is normal and the headache should go away within a few days to a week after wearing the new eyeglasses regularly.
It can take some time for your eyes to adjust to the new eyeglasses and once your eyes have had time to adjust to the new eyeglasses then the headache should go away.
If your headache still lasts longer than a week after getting the new eyeglasses then you should go to the eye doctor and let the eye doctor know that you're still having a headache with the new eyeglasses.
You may need a different eyeglass prescription because those eyeglasses may be to strong for your eyes or you just need something less strong.