Hello and hope you are doing well.
It could be enlarged lymph node/nodes. Lymph are protective mechanisms of the body and they 'trap' the infecting source causing enlargement of lymph nodes. The infection can be from the draining skin or the organs. The other causes for enlarged nodes are tumors or inflammations to name a few. The swelling and pain could also be due to mastoiditis, which is infection of the bone behind the ear. This happens when there is a middle ear infection, which spreads to involve the mastoid bone. But as your symptoms are resolving, you could wait and watch. However, if you develop fever, increase in the size of the swelling or pain; please consult your primary care physician. In the meantime you can continue OTC ibuprofen for relief from pain.
Hope this helped and do keep us posted.