At what point do I see a doctor for diarrhea?

Sorry if this is tmi but I’ve been having diarrhea for 3 or 4 days and it’s pretty painful and I have to run to the bathroom. I don’t know what’s causing it but it hurts and it’s not getting better :( when do I see a doctor

And my period just ended about 4 days ago after having it for 2 weeks (I’m 10 weeks postpartum)