Yes, it's indeed highly recommended. The physical exercise must be adapted to the moment of the gestation in which the woman is. As is logical, the more advanced the pregnancy, the milder and more controlled the exercises that the future mother should carry out.
It is recommended to do aerobic sports of moderate intensity, avoiding competitions or very high intensities or those that imply sudden changes.
Relaxation, flexibility and muscular strength are the qualities that should be worked on the most, especially in the last months of pregnancy, as they will be of great help at the time of delivery and will greatly facilitate the situation.
In any case, the intensity and type of exercise should always be adjusted to each situation. If you want more information about this, you can consult this link: Sports during pregnancy.