I recommend that you get in to see your primary care doctor
at your convenience. Although the fact that the pain in your toe has subsided is encouraging and suggests that things are improving, the persistent swelling should be evaluated, to make sure there is nothing that needs immediate medical treatment.
It is most likely that you did sprain a small ligament in your toe when you stubbed it. It is also possible that you had a small fracture of one of the bones in the toe. Your doctor would be able to distinguish between these possibilities by taking an x-ray
to look for broken bones, which they may decide is necessary given that the swelling is still persistent.
Unfortunately, if your doctor does diagnose this as a bad sprain, it may take a really long time to get better entirely, even weeks to months. In particular, with bad sprains, the swelling may persist for weeks even after the pain has already started to go away.
Your doctor will help you determine whether or not you just need to wait things out or whether there is a more serious complication of your injury
requiring more intensive treatment, such as referral to an orthopedic doctor.