Baby toe nail ripped off

I was just changing my baby and noticed one of his toe nails have been ripped off and is just hanging there. Should I cut it or let it come off by itself? I could barely look at it he’s a very active baby I couldn’t get him to keep his legs still. It looks like it’s cracked/ripped off right to the base of the nail or pretty close to it. He’s 6 months old and currently trying to crawl/ do planks so I’m guessing he injured it that way. I feel so bad… has anyone had this happen? What do I do about it?