How can you make magnesium carbonate?
The best way to make magnesium carbonate is to opt the laboratory route (mix magnesium chloride and sodium bicarbonate) as described in the Wikipedia article of magnesium carbonate.

$$\ce{MgCl2(aq) + 2NaHCO3(aq) → MgCO3(s) + 2NaCl(aq) + H2O(l) + CO2(g)}$$

The advantage of this process is that the byproduct do not interfere with the main product (sodium chloride is soluble in water, carbon dioxide bubbles out) leaving behind magnesium carbonate as precipitate.

Alternatively, magnesium carbonate can be prepared from magnesium carbonate by bubbling carbon dioxide in it. The advantage of this process is that there are no byproducts.



Note: If you use sodium carbonate, you will get a  precipitate of basic magnesium carbonate—a hydrated complex of magnesium carbonate and magnesium hydroxide—rather than magnesium carbonate itself is formed.

$$\ce{5MgCl2(aq) + 5Na2CO3(aq) + 5H2O(l) → Mg(OH)2·3MgCO3·3H2O(s) + Mg(HCO3)2(aq) + 10NaCl(aq)}$$

You can see that a basic salt is formed and also magnesium bicarbonate is formed which add to the difficulty of separating them and decomposing them to get magnesium carbonate and thus this process is not feasible.