First I am not a doctor.
But my opinion only, pain that does not go away is there for a reason. It's your body's way of telling you to stop. If it were me, I would stop for a few days and then try out gentle rides. If I were to still have pain with an easy ride, I'd think about seeing a Dr. and go on their advice. Hope this is nothing big and you feel much better soon.