Oh gosh poor thing, I have ripped nails out in doors like that - it was a habit as a child unfortunately.
Don’t try to cut off the dead nail yet.
I would gently bathe it in tepid water to clean it up a bit. Then dab it dry with lint or let it air dry (no cotton wool, the fibres will snag).
Then put some antiseptic cream on, just a little not enough to make it gungy.
Then gently put on a lint dressing, large enough to easily cover the nail and nail bed and then tape it so it’s a nice fat protected area. I guess any kind of medical tape is ok, but I’d probably use that papery microporous tape.
Do NOT use a regular elastic plaster with a tiny bit of lint in the middle, as it is likely it could slip and the elastic sticky stuff on that nail would be very painful and likely end up with ripping it off worse.
If you are still worried about bashing it or snagging it, you could at night gently tape the little finger to the ring finger, to stabilise and protect it.
You will likely then need to replace the dressing in a few days and if it looks fine, then swap out for a dry dressing. But keep it protected for enough time that the nail starts to recover.
in due course the nail will drop off completely, or you can snip off the dead part without it being incredibly painful and the skin will have hardened and healed enough to leave it open to the air so it will regrow.