Damn this is a crime. Do not ever retaliate a little bird. IDK if the beak can grow back or not.
If your bird sleeps in a dark and quiet place and still has his eyes closed during the day often, I consider that a warning sign, he might be sick.
End of this March my son (sun conure) was going through his puberty. He hated the radiation from phone calls. He once aggressively bite my hand while I was making a phone call, and he ripped off a chunk of flesh from my hand. I didn't punish him but put him back into his cage. 3 months+ later, there is still a scar on my hand, I'm cool with it accompanying me for the rest of my life though.
Around 10 days ago I adopted a red factor sun conure of 3-4 years old. He used to be owned by a breeder. He lost his mate at some point and according to the breeder, he started biting around then. He would put on a thick glove every time he grabbed the sun or replaced food / water. And the sun would attempt to bite him every time.
This is a difficulty case, similar to my red sun. What I did was giving him enough space for a few days after he arrived at my place. I hand fed him kiwi and pellets through the cage, so he could get used to my hand. A few days later I would put my hand near him doing nothing, to let him know that my hand is not dangerous. Try not to grab him until he trusts you. He didn't bite me at all during the first week. Now he can do step up and down my shirt / shoulder. He is still afraid of hands a little, but he is doing much better. He sometimes gets protective of his food bowl and showed a little aggression trying to bite my hand. I either back off and told him no, and then approach the bowl with my hand again, so he wouldn't bite.
He did bite my hand once or twice cuz I was being impatient trying to get him out of his cage to get some exercise. It was much weaker than my son's bite

He always wanted to stay in his cage and not moving, and he is way overweight (estimate body weight > 200 g) from eating moldy seeds at previous owner's place. He could barely fly. Now I'm getting him fresh food and more exercise.