Aisha said that the Prophet ﷺ never struck anything with his hand, neither a woman nor a servant, except in fighting for the cause of Allah. Anas, who served him from boyhood for ten years, said that he never said 'uff' to him and never asked why he had done or not done something. The Quran says that it was by Allah's mercy that the Prophet ﷺ was gentle with people, and that if he had been harsh and hard-hearted they would have left him.
Classical jurists, relying on a report outside the two Sahih collections that mentions striking for neglect of prayer at ten, allowed a light form of discipline for older children. They set strict limits: never in anger, never on the face or head, never causing pain that lasts, injury or fear, and never as a first step. Many contemporary scholars go further. They note that the Prophet ﷺ himself did not strike his wives or servants, that modern research on child development has linked physical punishment to harm, and that the aim of discipline is understanding, so they advise that it be avoided altogether. Any hitting that injures or humiliates is forbidden by all.
What the texts ask for instead is patience: explaining, setting clear and fair limits, losing a privilege, and above all being a model. The Prophet ﷺ taught that the strong person is the one who controls himself when angry, which is the main test for a parent who is tempted to lash out. He also told a father to be fair among all his children when giving gifts, and the man took back a gift he had given to only one son. A child who feels both loved and treated fairly is more likely to listen.