Pritti is 30 yrs old and with our family whole time (last 20 yrs with me) - So there's been lots of experience here with his bites.
Basically, he gets a time out - like a young child would - and then we have a little talk and move on.
I'm talking about truly hard bites - meant to draw blood here (not nips or big nips):
Usually occurs when:
(1) he is in fear
(2) caught off guard, i.e. a sudden quick movement or finger showing up in front of face while he is zoning out on something else (that's a big one)
I can only think of rare ocassions with an isolated bite because he was mad or felt annoyed. But in those circumstances there is usually warning, like he will open beak and posture when getting real close to him, or he'll push finger away with a little growly/squeeky noise. Keep at it and he'll just clamp down hard.
I know lots of people's practice is to not say "no" or put them in cage or react much. But before we knew that (way back when) it is what we did in response and so it's what we still do because it works and has worked for us for decades -- so now if Pritti needs to know some behavior like big bite won't be tolerated, he does get a deep firm "No" "No" and he will usually comply after that, get on finger and he is put inside his cage on a certain perche (doors are left open so he isn't locked in and can come out). He usually stays there for a minute (contemplating, I like to think), then inevitably he'll start throwing kisses, or he'll go out to top of cage and stand in the corner closes to us and look all cute
If the bite occurs while he is on his cage or perch, then I just say the "No" "No" and look him in the eye and walk away and do whatever I was doing. I'll usually try to go to a different room like kitchen or den (he has a special large area in our great room in front of a window for his flight cage). I don't lock him in though.
Sometimes I think we don't realize that there is something else going on that may have altered our immediate relationship with our bird that is causing jealousy, anger, confusion, fear. For example -- schedule change for you and bird, or another family member in house at new times of day, lighting change, sound changes, rearrange furniture, new hair style or color, glasses on or off, skipping favorite foods like u go on diet and stop sharing foods he was used to, spending more time on phone in front of him/her, new shoes (footware always gets Pritti's attention). All these things can make change a birdie's mood or preception a bit.
(I save a completely different tone, less firm, more cheery "No" for little things, like walking somewhere he shouldn't, or chewing at something he shouldn't.
Seems to work for us. Just another experience and perspective.
-----
Example -- He was in car sitting on top of his travel cage on passenger seat (about 18 years ago). I was in driver seat. We were parked for a little while. I was talking to someone sitting behind me and quickly picked up my had with finger pointed to jesture and the finger/hand swiped directly in front of Pritti while he was quiet and calm and zoning out (I forgot he was even there), and he grabbed on to the finger so hard and literally wouldn't let go. I had to actually shake my hand hard a few times to get him unstuck (like shaking down an old fashioned thermometer). That was probably the hardest bite I ever got. He and I were both stunned for a while ! But I think his defenses just kicked in and he was under a "surprise attack" by my finger.