Bamidbar / Numbers 20:12
וַיֹּאמֶר יְהוָה אֶל־מֹשֶׁה וְאֶל־אַהֲרֹן יַעַן לֹא־הֶאֱמַנְתֶּם בִּי לְהַקְדִּישֵׁנִי לְעֵינֵי בְּנֵי יִשְׂרָאֵל לָכֵן לֹא תָבִיאוּ אֶת־הַקָּהָל הַזֶּה אֶל־הָאָרֶץ אֲשֶׁר־נָתַתִּי לָהֶם׃
And the Eternal said to Moshe and to Aharon: "Because you did not believe in Me, to sanctify Me before the eyes of the children of Israel, therefore you shall not bring this assembly into the land which I have given them."
Pshat פְּשָׁט
Before the whole people
Rashi: were it not for this sin, Moshe (Moses) and Aharon (Aaron) would have entered the land. Earlier Moshe said harsher words, but in private, while here it was before all Israel, and for the sanctification of the Name Scripture did not spare him. Had the rock given water at a word, the people would have said: all the more must we keep the word of the Eternal. Netziv: Aharon should have prayed, so he too shares this sin.
How Rashi and Haamek Davar explain it
Remez רֶמֶז
Measure for measure
Ba'al HaTurim: "therefore" (לָכֵן) in gematria equals "measure for measure" (מִדָּה בְּמִדָּה). Rabbeinu Bahya and Chizkuni: "therefore" is an oath, as in "Therefore I have sworn to the house of Eli." Bahya adds: Moshe (Moses) knew of the oath and still at once sent messengers to the king of Edom for the sake of this land.
How Kitzur Ba'al HaTurim, Rabbeinu Bahya, and Chizkuni explain it
Drash דְּרָשׁ
The stone that blinded
Midrash Tanchuma: Moshe's (Moses') punishment over the water was prepared in advance. Already in Avraham's days Kadesh was called Ein Mishpat, "the spring of judgment": this is the spring of Moshe's judgment. And as a father whose son blinded his own eye with a stone says of every stone, "This one blinded my son," so Scripture says again and again: "These are the waters of Merivah."
How Midrash Tanchuma explain it
Sod סוֹד
A generation yet to come
Agra DeKala: the wilderness generation stood above the holiness of the land, and Moshe's (Moses') holiness was higher too, so he will enter the land only in the future. "This assembly" is precisely the generation entering the land now. But his own generation, the generation of knowledge, Moshe will yet bring into the land, the land the Eternal will give anew.
How Agra DeKala explain it