Prenatals??

Can you take the prenatals the doctor prescribed you when you was pregnant before after you have a miscarriage later on when you want to try again?? I have gummy ones from Walmart but heard they aren’t as good at helping