Read chapter 20 carefully. Even though you and I might not fault Moses for being angry since the people were AGAIN grumbling. He was commanded by God to take his rod (a useful too and a sign of ones authority) and to SPEAK to the rock (20:8) so that it would yield water, but he STRUCK the rock with the rod (20:11). The waters were named Meribah (20:13) meaning contention because the people there contended with God.
Edom’s refusal to allow Israel to pass through his land “on the highway without eating or drinking anything” comes back later to haunt him (some time to come yet – read carefully!).
Hormah (21:3) is that which is devoted to utter destruction.
They grumbled against the food God provided (21:4-5) so God sent poisonous snakes among them to bite them (21:6). God had Moses make a bronze figure of a snake and put it on a pole, all who looked to it were cured of their snake-bite. This was a sign of Christ who was lifted up on a tree (cross), but it became a stumbling block to the people because some worshiped it.
Psalm 34:19 tells us that life is not a bed of roses, that the afflictions of the righteous are many; however; God delivers out of all of them! In various ways in Psalm 35 David says of his enemies, “Sic ‘em, Lord!”