Headaches/magnesium

Hi has anyone taken the CHEWABLE magnesium for headaches? I’m 16 weeks and on day three of a horrible headache. My ob said to try some magnesium. All I could find locally is the target brand 400mg chewable tablets.

Also wondering if it helped your heachches at all I’m basically maxed out on Tylenol and definitely can’t have more caffeine. 😭