Biting is extremely common in parrots and one of the most common reasons they are abandoned by their owners. While each parrot species is slightly different regarding biting and ways to stop bad behavior, some common sense advice can apply to all of them.
After bringing your new parrot home, give it a few days to get used to its new home before you attempt to hold it. Start offering it foods from your fingers. Do not play tug-o-war with food. If he grabs the food and pulls it, let him have it.
Do not insist on holding the food while he eats it. You are just going to make him angry. By offering his favorite foods and treats by hand, he will soon look forward to you coming. Talk softly and while and gently try to pet him.
Okay, you just got bit and you are scared of him. Now what? You won’t like hearing this, but you must keep trying and not pull your hand away when he bites.
The same principle is used on parrots. If you pull your hand away and yell, then they got a reaction out of you and will try again to get the same response. I know you do not think it is funny but they do. Do not put them back in the cage. You are rewarding them for biting you.
Here is a trick that has worked with a few parrots. Put some yogurt, honey, or something sweet on your fingers. Hopefully, when he goes to bite he will taste the food and start licking your fingers instead. Eventually, he will see that your fingers mean no harm.