Nail injuries are a painful but very common accident for many people. Thankfully they generally heal well without complication. Physicians who would be well qualified to discuss this issue with you include your primary care doctor
or your dermatologist
When a nail is damaged and separates from the underlying skin under the nail, a new nail will grow in under the damaged nail in most cases as long as the centers for nail growth that are located in the skin below the cuticle are not damage.
Often the correct thing to do can be to leave the old nail in place, as it provides some protection to the sensitive skin under the damaged nail as the new nail grows in.
There are exceptions to this, for example if a large collection of blood forms under the damaged nail, the pressure can be quite painful and can require puncture or removal of the nail to relieve the pressure.
Other cases in which the nail must be totally or partially removed include when the skin under the nail has been deeply torn and requires stitches to close the wound.
As always, the diagnosis and management of your specific condition would require a physical examination by your personal physician. If there are residual symptoms or concerns, you could make an appointment with your primary care doctor or your dermatologist.