The whole community of Israel started out from the Desert of Sin. They traveled from place to place, just as the LORD commanded. They camped at Rephidim. But there wasn't any water for the people to drink.
References for Exodus 17:1
So they argued with Moses. They said, "Give us water to drink." Moses replied, "Why are you arguing with me? Why are you putting the LORD to the test?"
But the people were thirsty for water there. So they told Moses they weren't happy with him. They said, "Why did you bring us up out of Egypt? Did you want us, our children and our livestock to die of thirst?"
Then Moses cried out to the Lord. He said, "What am I going to do with these people? They are almost ready to kill me by throwing stones at me."
The LORD answered Moses. He said, "Walk on ahead of the people. Take some of the elders of Israel along with you. Take in your hand the wooden staff you used when you struck the Nile River. Go.
I will stand there in front of you by the rock at Mount Horeb. Hit the rock. Then water will come out of it for the people to drink." So Moses hit the rock in the sight of the elders of Israel.
Moses called the place Massah and Meribah. That's because the people of Israel argued with him there. They also put the LORD to the test. They asked, "Is the LORD among us or not?"