Magnesium glycinate made me feel like hell!!

Hello everyone , this is my second pack of magnesium glycinate , i took it for anxiety and for sleep , i took the first pack which was so good and had good effects , slept well and felt relaxed , the second pack first pill gave me anxiety and heart palpitations , this happened 4 hours after i took the pill

i saw some posts that MG caused this to people but i'm not sure , any advice ?!