It was narrated from Sulaiman bin Amr bin Ahwas that his father said: I heard the Messenger of Allah ﷺ saying during the Farewell pilgrimage: "No criminal commits a crime but he brings. (the punishment for that) upon himself. No father can bring punishment upon his son by his crime, and no son can bring punishment upon his father".
This hadith also reminds us that parents should not punish their children excessively if they have done something wrong; instead, they should guide them in a loving way so they can learn from their mistakes and become better people in the future. Parents should also remember that it is not fair to hold them responsible or punish them if their child has committed a crime; instead, it is up to the authorities to decide what punishment is appropriate according to the law.
Overall, this hadith teaches us about justice and fairness between individuals as well as between parents and children. We must all take responsibility for our own actions while also understanding that no one else can be held accountable or suffer punishment on our behalf.