We do not read in Exodus 2:23 that the Israelites pray and cry out to God. Later in Exodus 4:31 it is said that they believed. But that was after God’s message through Moses and the signs he did before the eyes of the people. They quickly lost their faith again after that (Exodus 6:9).
However, the people’s cry went up to God (Exodus 2:24), just like God heard the loud wailing of the Egyptians after their firstborns were killed (Exodus 12:29). But the latter was commanded by the Lord himself (Exodus 11:6). He has his reasons (Exodus 2:24–25) to help the Israelites and not the Egyptians.
23 During those many days the king of Egypt died, and the people of Israel groaned because of their slavery and cried out for help. Their cry for rescue from slavery came up to God.