Magnesium and vitamin B12 are vital nutrients for supporting energy. Here's what to know about when and why one may be more beneficial than the other.