“You must be careful to do everything [the Pharisees] tell you. But do not do what they do, for they do not practice what they preach.” - Matthew 23:3
The Pharisees met Jesus. The Pharisees were religious leaders who wanted people to keep the law of Moses. So they built up all kinds of rules around the basic law, and they burdened the people with them. In the process, many of the leaders got so distracted by the rules that they forgot the heart of the law (love God; love your neighbor), and they did not practice what they preached.
In Matthew 23:1-12, Jesus let the Pharisees know what he didn’t like about them. Jesus agreed with a lot of what the Pharisees taught. Jesus was a faithful Jew, so he thought the Pharisees had good things to say about what it meant to love God and to serve God. But Jesus showed that the Pharisees cared more about the appearance of loving God than about actually loving God.
Following Jesus does not mean throwing out all religious traditions. Jesus knew that faith is meant to be practiced in community. We cannot be Christians by ourselves; we live within the guidelines of a community of other Christians.
But following Jesus also does not mean following the law just for the sake of the law. Jesus always called his disciples to put people first and traditions second. Jesus challenged the Pharisees for making the rules of the law too important. He called them to show love to people, as the law was intended to help them do. Jesus calls us to love people today too, following his excellent example.