Signs of preterm labor ?

I’m 31 weeks and 3 days pregnant and since yesterday I’ve had diarrhea pains. Nothing too serious and baby is still moving normally. But this morning I woke up and they were bad almost cried . They stop when I do go to the restroom but come back. I looked it up and it says it can be a sign of pre term labor. What should i do?