#Why did Yahweh say that Moses was going to die on the mountain?

Moses was going to die on the mountain because he was unfaithful to Yahweh at the waters of Meribah in Kadesh and because Moses did not treat Yahweh with honor and respect among the people of Israel. [32:50-51]