This can be from a trauma or a fungal infection.
You can try soaking the dog's foot in epsom salt solution (use the instructions on a foot bath)if you have some to help curb infection. You can also put neosporin or triple antibiotic ointment on it and if you have 3% peroxide around you can clean the toe off with that.
You may want to get him antibiotics or have him checked for a fungal problem in his nails and if you do that will mean a vet visit. He may also need the vet to fix any broken bits of nail below the toe where you can see.
Try to keep him from chewing at it. You can try giving him 1/4 of a buffered aspirin in some food for the pain but not if he is bleeding.
It should grow back but it might be deformed when it does.
Hope this helps you!
Please press Accept if you find my answer helpful. Want more info? Just reply on your question!
Bonuses for good work are always appreciated!
Thanks for the opportunity to help you!