Our biting phases seemed to be about a) he had learnt he could bite and was practising and liked the reaction b) he was really at the end of a feed and bored but didn't want to let go c) he was teething.
I tried many things but I always kept the fingernail on my pinkies short and at the ready. Short so it didn't scratch
DS and would slip it into the corner of his mouth, it was the best way I found to get him to unlatch without hurting me. I would also at various times so no and take him off - this worked sometimes and didn't others. As he got older I would take him off once and if he did it again I wouldn't put him back on, sometimes I wouldn't put him back on at all, sometimes offer the other side etc...
It will pass and your LO will do it again no doubt

and then stop etc...
DS doesn't bite now even when he is teething though.