She helped to save Moses when he was only an infant. Moses’s mother left him in a basket to protect him from being murdered by Pharaoh due to his being a Jewish baby. When Pharaoh’s daughter found Moses and had mercy on him, Miriam devoted herself to Pharaoh’s daughter in order to raise him so that they could remain together.
We can credit Miriam with instilling Moses with a devotion to the Lord that manifested itself in later days, which enabled his openness to divine encounter with the one true God and his moral conscience which guided Israel all the way to the promised land.
“Then Miriam the prophet, Aaron’s sister, took a timbrel in her hand, and all the women followed her, with timbrels and dancing. Miriam sang to them: “Sing to the LORD, for he is highly exalted. Both horse and driver he has hurled into the sea.’” (Ex. 15:20–21)