It is not normally easy for a person to accept criticism. One justifies one's actions rather than admitting mistakes. When you criticize someone, he is usually hurt, does not accept the criticism, and even worse, retorts, defends himself and argues. But Moshe shows us in this week's parasha how to give criticism in such a way that it is accepted. As Rashi explains, he mentioned the places where people had sinned in the past decades. No one was hurt because there was no criticism. Instead, everyone could understand the implications for themselves and see for themselves that their actions were wrong. So people felt honored to be treated so kindly and could accept the criticism in that way.
But there is a deeper aspect to this action: Moshe did not express the criticism himself, but only implied it - meaning that the people expressed the criticism for themselves when they understood Moshe's words and applied them to themselves. As a result, they did not refute or justify anything, because one does not refute one's own words.
As Rashi points out, it was also important that Moshe speak to the entire nation. And yet the speech was appropriate for everyone. Not everyone understood the implied criticism in the same way. Some understood the simple meaning: the places and the sins associated with them. Others could find allusions, for example, in the order in which the sins are mentioned. A well-known example is the episodes of the Golden Calf and Korach's revolt, which are mentioned in reverse order. A well-known explanation by the Gaon of Vilna states that the Ten Commandments are formulated in the singular. Thus, after the people sinned with the Golden Calf, they could argue that the prohibition against idolatry was addressed only to Moshe in the singular. Thus, the people did not sin at all. It was Korach's revolt, in the course of which it was argued that all had heard the Ten Commandments at Mt. Sinai and were thus sanctified, that invalidated the justification and made the Golden Calf episode a retroactive sin. Therefore, the mention of Korach comes first, and only then the mention of the golden calf.