I’ve read that yelling is interesting to them, and they might do it more if you react because it’s funny. That’s also been my experience with my kids. I gently remove the latch and say no, and then offer again in a moment or two. Try to stay calm but make it inconvenient for baby by removing the nipple and waiting a few seconds (like the time for the sting to go away lol) instead of letting them nursing immediately afte biting.
Reply to Teething