I recommend discussing this issue with a podiatrist
or your primary care doctor
. When a toenail is injured, say by stubbing the toe or by having a heavy object fall on it, it is very common for the original nail to separate and/or fall off. This is due in part to inflammation and swelling under the nail and also in part due to damage to the cells at the edge of the nail that are responsible for producing the new nail tissue.
Sometimes, when the new nail tissue is regenerating, it can still do so in a way that is quite irregular, leading to the type of problem that you are describing. It is hard to predict what the final outcome of this will be. For example, sometimes the nail will grow back normally after a few iterations. Sometimes, however, there may be permanent damage to the nail plate, meaning that the nail will be permanently deformed.
Again, I would recommend visiting a podiatrist or your primary care doctor. Either one will be able to take a look at your nail and help you decide whether any treatment at this time (such as trimming off the excess detached nail) might be helpful. They'll also be able to rule out any complicating problems, such as an infection or retained foreign body.