"And there was no water for the congregation" (Numbers 20:2). Because three sustainers stood up for Israel when they went out of Egypt, as it is said, "And I sent before you Moses, Aaron, and Miriam" (Micah 6:4). Miriam — by her merit the well was given to them; and the manna was given to them by the merit of Moses; and the clouds of glory by the merit of Aaron. When Miriam died, the well was removed; therefore there was no water for the congregation.
Miriam's Well and the Three Sustainers of Israel
Midrash Aggadah, Numbers 20:2
ולא הי' מים לעדה. לפי ששלשה פרנסים עמדו להם לישראל כשיצאו ממצרים, שנאמר ואשלח לפניך את משה אהרן ומרים (מיכה ו' ד'). מרים בזכותה הבאר ניתן להם, והמן ניתן להם בזכות משה. וענני כבוד בזכות אהרן, מתה מרים נסתלק הבאר, לכך לא הי' מים לעדה: