To prevent excessive weight gain during pregnancy, focus on eating a balanced diet with plenty of fruits, vegetables, and lean proteins. Stay active by doing exercises suitable for pregnancy and consult with your doctor for personalized guidance.