Remember what happened when Moses encountered two exact situations? In Exodus 17 the children of Israel had no water. In verse 6 the Lord instructed Moses. “Behold, I will stand before you there on the rock in Horeb; and you shall strike the rock, and water will come out…”
In Numbers 20 they again had no water. In verse 8 the Lord told Moses, “…speak to the rock before their eyes, and it will yield its water…” Moses was angry at the people’s complaining and in ungodliness he disobeyed the Lord.
Verse 11 says, “Then Moses lifted his hand and struck the rock twice with his rod; and water came out abundantly…” Yet, his act of independence from the Lord cost him. Verse 12 says, “…Because you did not believe Me, to hallow Me in the eyes of the children of Israel, therefore you shall not bring this assembly into the land which I have given them.”