This question already has an answer here:
Was Moses reprimanded in Exodus 17 and Numbers 20:10-13 for not speaking (therefore showing a lack of faith in the Lord’s abilities to turn Moses' weaknesses into strength (which was why the Lord put Aaron there to help him)), or was it for not following the Lord's instructions with exactness (striking instead of speaking of water from the rock at Meribah), or was it for taking credit for the act?
Exodus 17:2-6 (NASB) 2 Therefore the people quarreled with Moses and said, “Give us water that we may drink.” And Moses said to them, “Why do you quarrel with me? Why do you test the LORD?” 3 But the people thirsted there for water; and [c]they grumbled against Moses and said, “Why, now, have you brought us up from Egypt, to kill [d]us and [e]our children and [f]our livestock with thirst?” 4 So Moses cried out to the LORD, saying, “What shall I do to this people? A little more and they will stone me.” 5 Then the LORD said to Moses,
“Pass before the people and take with you some of the elders of Israel; and take in your hand your staff with which you struck the Nile, and go. 6 Behold, I will stand before you there on the rock at Horeb; and you shall strike the rock, and water will come out of it, that the people may drink.”
And Moses did so in the sight of the elders of Israel.
Numbers 20:10-13 (NASB) and Moses and Aaron gathered the assembly before the rock. And he said to them, “Listen now, you rebels; shall we bring forth water for you out of this rock?” 11 Then Moses lifted up his hand and struck the rock twice with his rod; and water came forth abundantly, and the congregation and their beasts drank. 12 But the 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.”
13 Those were the waters of [a]Meribah, [b]because the sons of Israel contended with the LORD, and He proved Himself holy among them.
Note: I would like to know the answer in order to better serve the Lord. My fears include not correctly opening my mouth to speak (faith factor), not correctly following the exact promptings he whispers to me (like to visit people (obedience factor)), and not giving credit to God for the miracles in my life (recognition to God).