We find in the Meforshim different explanations for understanding the story of the Mei Meriva.
The Rambam writes that the flaw was that Moshe Rabbeinu's words had a touch of anger when he said שִׁמְעוּ נָא הַמֹּרִים - listen, (you) rebels. Since the yidden of that generation strived to emulate the tzaddik's behavior, and (as in the Rambams words) 'hoping to achieve the success of both this world and the World to Come', by imitating his actions, he must be even more careful conduct himself with complete exactitude. Thus, when Moshe Rabbeinu scolded Bnei Yisrael rather than displaying a little more tolerance, Hashem held him accountable for this harsh expression.
(שמונה פרקים להרמב"ם סוף פרק ד)
The Ramban disagrees with this explanation and offers an alternative approach. He explains that generally Moshe Rabbeinu attributed all miracles to Hashem, emphasizing that it is He who conducted the miracle. By the incident of מֵי מְרִיבָה too, he ought to have said that Hashem will give them water from the rock. Moshe, however said הֲמִן הַסֶּלַע הַזֶּה נוֹצִיא לָכֶם מָיִם - from this rock we will extract for you water? This phrase seemingly attributes the nes to Moshe and Aharon, and does not mention Hashem.
This is what Hashem was reprimanding him for with the words, יַעַן לֹא הֶאֱמַנְתֶּם בִּי לְהַקְדִּישֵׁנִי - for you did not "believe in Me", to sanctify My Name. Had Moshe expressed himself correctly and accredited this miracle to Hashem, as he had done until now, that would have sanctified Hashem's Name to its utmost. It was because of this fault that Moshe would not be zoche to enter Eretz Yisrael.
Once again, we see the powerful effect our words could have. Moshe Rabbeinu, the greatest of all nevi'im, was held accountable for speaking in a way that was unbefitting of him. As much as all of this is far beyond our simple comprehension, it should serve as a demonstration of the power of our speech. It should be a reminder of how we are to be extremely meticulous about measuring our words properly in all circumstances.
May we always ensure to maximise the immense potential that our words possess, and may our words have only a positive impact on the world.
