As shown in the picture, if the nail root is damaged, it can't be recovered. Even if a part is retained, the nails that grow behind will be deformed.
It is recommended to go to the hospital for examination first. If the damage is serious, plastic surgery and artificial nails are recommended.