Thank you for your question.
I am Dr Saha, I shall try my best to help you.
There can be a few possibilities.
It can be due to paronychia or infection of skin & soft tissue around nail.
This is often a bacterial infection.
Sometimes a fungal infection can be there.
But sudden onset is likely due to a bacteria.
I would suggest to get an examination by doctor without delaying.
Oral antibiotic can be needed.
Soaking in warm water 2 -3 times a day can be helpful.
You can take antiinflammatory analgesics like motrin or naproxen, if there is no other contraindication.
I hope this information helps.
If there’s anything else I can do, please let me know.
If you are satisfied, please rate my answer as good or excellent.