The same command, in nearly the same words - the moment the covenant was rebuilt after Moses broke the first tablets in anger.
At that time Yahweh said to me, “Cut two stone tablets like the first, and come up to me onto the mountain, and make an ark of wood.
Yahweh said to Moses, “Chisel two stone tablets like the first. I will write on the tablets the words that were on the first tablets, which you broke.
Moses adds one detail Exodus never mentioned: he built the ark himself, of wood, to hold these new tablets. The container for the law and the second chance it represents get built in the same breath.