Magnesium is one of the essential macronutrients for the body as it plays a key role in various biological functions.…