I either have diarrhea or constipation, HELP?!?!

I’m 9 weeks and I get really constipated for 4-6 days then I have really bad diarrhea for 1-2 days after then back to being constipated. What can I take to help? (Mainly for the diarrhea)