It's tricky...
Mine have never liked getting their nails trimmed and get spooked when they hear the nail cutting noise.
Get a pair of small animal nail trimmers (easier to use than small human ones). Or small human ones if you can't get animal ones. Get a towel or a bonding bag and cover them in it do they won't bite you. Then gently find a foot and trim some toes.
You can try treats in the bag as well to keep them busy.