Israel saw the great power that YHWH used against the Egyptians, so the people feared YHWH, and they believed in YHWH and in his servant Moses.
Exodus 14:31

If you believe in God, you must also believe in his prophets. To reject the messenger is to reject the one who sent the messenger. Of course, there are many more false prophets than legitimate ones. You won't be able to tell them apart if you aren't very familiar with God's character as revealed through his previous prophets in the Scriptures.