Started by having a single nail that I wouldn't bite - all the others were fair game. You start becoming quite obsessed with that one, noticing how much better it looks than the others etc, and being proud of how that one is unbitten.
Then simply extend that to 2 nails etc
That nail has never completely recovered; it still looks stubby compared to the others even though I no longer bite it.
Put one finger in your mouth. Bite down. Take the finger out, look at it and say out loud "I will not bite my nails". Repeat for each finger on both hands.
Repeat this process 2-3 times a day. After a day or so you will start to "catch yourself" when you start nail-biting. After a few more days you should find the nail-biting habit diminishes and then disappears altogether. If the habit starts to return after a few months (as can happen) then simply repeat the technique.