At the rock at Horeb in the wilderness, the Lord said “you shall strike the rock, and water will come out” of it, that the people may drink”. Moses did so in the sight of the elders, Exodus 17:6.
But Moses fails to follow the Lord’s instructions at another time.
The Lord said, “assemble the congregation and speak to the rock before their eyes, that it may yield its water”.
Moses lifted up his hand and struck the rock twice with his rod; and water came forth abundantly, LORD said to Moses and Aaron, “Because you have not believed Me, to treat Me as holy in the sight of the sons of Israel, therefore you shall not bring this assembly into the land which I have given them.”
Note Aaron a Priest and brother of Moses dies on Mount Hor and is gathered to his people. Numbers 20:8-12; Deuteronomy 34:4.
Because Moses cannot enter the promised land he is allowed to go up from the plains of Moab to Mount Nebo, to the top of Pisgah, which is opposite Jericho. And the LORD showed him all the land that had been promised. He could see it with his eyes, but could not go over.
Moses the servant of the LORD died and was buried in the valley in the land of Moab. Moses was one hundred and twenty years old when he died, his eyes were not dim, nor his vigor abated Deuteronomy 34.
Joshua is commissioned by Moses to bring the sons of Israel into the promised land because Moses was not allowed to. Deuteronomy 31:23.
A lessen is learned here when a command is given by the LORD, do exactly as commanded. Faltering can cause eventual problems.