I would say that he first rebuked the people, saying, “Listen, you rebels, shall we bring water for you out of this rock?” After saying that he then struck the rock twice with his staff. Water poured out in abundance, but the Lord was extremely displeased with Moses and Aaron.
In other words, They didn’t trust in God which then lead the lord to not enter the Promise Land.