Don't think that's a true "worm" more of a larva / grub / maggot.
Remove it and treat soil with BTi, should help kill any others hidden in it.
Good Luck
He's definitely a bad guy but not that bad u can't control, just make sure he's or she is cleared from ur garden bcus they'll start eating all your leaves 😉 best of luck 👍
Remove it, these worms are harmful for the roots, it looks like a white worm from a beetle which eats basically roots, bot 100% sure but it looks like it