Think of Moses’ disobedoence, for which he is punished by being denied to enter the Promised Land
What happened is that he allowed his annoyance with the Israelites to be demonstrated in lack of faith in God. Moses was to strike a rock to make water flow. When he did, the water didn’t flow right away, so he struck the rock again. Had Moses struck once and turned away, God would have provided the water, in HIS time. By striking twice, Moses was telling God, “Even though this is a gift from You, You will give it to us when I tell you to!” God’s mercy might have permitted Moses to enter the Promised Land, had the Israelites been more faithful and not complained so much; but they had to be schooled once again that worship involves grateful acceptance of the gifts
He provides when
He chooses to give them.
It’s also worth noting that by this time they had been wandering through the desert for 40 years. Why? Because when they first arrived at the promised land, Moses sent 12 “spies”, one from each tribe, to scout out the resources and provide intel on any opposition they may run into. After 40 days, the spies returned with reports of bunches of grapes so full they two men to be carried back, of “a land flowing with milk and honey”.
However, 10 of the spies also came back with exaggerated stories of the power of the enemies, that the inhabitants were giants “so large we were as grasshoppers in their eyes.” In short, they were faithless, refusing to believe God’s promise to give them the land. Of the 12, only Joshua and Caleb came back with truthful reports. As a result, those two men were the only people of their generation to be admitted to the land. The reason for the 40 years of wandering is so that all of the other people of that generation could die. Then the new generation could take the land God had promised them.
It is for this reason that Judaism requires 10 men for a quorum (a “minyan”) in order to offer public prayer.