The gynecologist is right. According to the new guidelines from the Ministry of Health, the best period during which to get the vaccine is between the 27th to 36th week of pregnancy, ideally during the 28th week because you can get a better maternal immune response during this period. Additionally, optimal passage of antibodies from the mother to the baby through the placenta is guaranteed. In any case, each period can be useful. Follow the indications given by your gynecologist.