Monistat 1

Have the reoccurring yeast infection. I have taken pill by doctor but doesn’t seem to fully take it away gives me relief for a few day. I bought monistat 1 (pill insertion) is it safe to use while 31 weeks pregnant? Is there anything else I can try? I’ve been drinking cranberry juice and eating yogurt. Helpppp