A magnesium atom shares two electrons with an oxygen atom is the correct statement.
When a magnesium atom reacts with an oxygen atom, magnesium gives up its two valence electrons and becomes two positive charges appear on it.
While on the other hand, the oxygen accepts these two electrons from magnesium and becomes a negatively charged ion so we can conclude that magnesium atom shares two electrons with an oxygen atom.
Learn more about bond here: https://brainly.com/question/25965295