It is better to take vitamins during your eating window, as most vitamins are recommended to be taken with food or after food for better absorption and prevent upsets to the stomach.
At first, you need to recognize whether your vitamins or supplements contain calories or not. If they are zero-calorie, you are free to have them both during fasting hours or eating hours.
Vitamins are non-caloric and they won’t break your fast. However, some formulas have added sugars that contain calories. So you have to read the labels.
Supplements less likely to break a fast:
Multivitamins, fish or algae oil, individual micronutrients, creatine, pure collagen, probiotics and prebiotics, l-tyrosine.
Supplements more likely to break a fast:
Gummy multivitamins, branched-chain amino acids (BCAAs), protein powder, those containing certain ingredients.