Goodhart's Law says that when a measure of success is used as a goal, it will stop working as it should. This is because people focus on the measure and not on the overall success of the thing being measured.
For example, let's say you want your soccer team to score more goals. You could decide that the measure of success for the team should be how many goals they score. The players on the team would then be tempted to focus on scoring as many goals as they can, instead of focusing on playing well and doing whatever it takes to win the game. Even though there could be other things (like passing the ball or playing defense) that would help the team win, they would be forgotten if the focus was only on scoring goals. So even though the team would be scoring lots of goals, they might not be able to win the game. That would be an example of Goodhart's Law in action.