“Their inheritance was by lot.” The “lot” was the Urim and Thummim that was in the breastplate of the High Priest. So the decision was by Yahweh, and that ended any potential quarrel and subsequent tribal warfare (cp. Prov. 16:3; 18:18).
“by the hand of Moses.” An idiom, meaning by the authority of Moses; Moses passed on the decision to divide the land by lot.