Moses did not speak to the rock as God had told him but rather struck the rock in anger and there would be consequences…
Numbers 20:12 “The Lord said to Moses and Aaron, “Because you did not trust in me enough to honor me as holy in the sight of the Israelites, you will not bring them into the land I give them.””
The Apostle Paul refers to ‘the rock’ as Christ in I Corinthians 10:3-4; “They all ate the same spiritual food and drank the same spiritual drink; for they drank from the spiritual rock that accompanied them, and that rock was Christ.”
The rock that was Christ was to be struck only once and Moses disobeyed God in this matter. Actions will always have consequences.
Moses would continue to lead the people and God would allow him to ‘see’ the promised land from a distance (Deuteronomy 34) – but the consequence of his actions would prevent him from crossing into the promised land.