Pulled groin/inner thigh muscle

I'm almost 34 weeks and all week I've been feeling groin muscle pain. It has started spreading to my upper inner thigh where it meets my groin and now it feels like I pulled a muscle there. Not sure how I would have done that but it hurts so bad, it hurts to walk. Has this happened to anyone? Idk what to do, do I just rest? I want to stay active but this hurts so much and I still have so many weeks to go!