How To Not Gain Too Much Weight

During pregnancy? It's not that I'm scared of being fat , it's just for health reasons you see I had a baby 4 months ago I used to always be thin but when I met my husband he loves eating out alot so I gained a lot of weight. With my first baby I was 165 lbs when I found out I was pregnant I gained so much weight I went from 165 to 202 . 
After I had my baby , I lost weight and was 6 pounds away from my pre pregnancy weight . But then I started gaining weight again. last time I weighed myself I was 176 lbs  I am currently 5 weeks pregnant and 178 pounds . ❗️ MY QUESTION is , what should I eat to not gain so much weight this time ? If I say im going to eat pure salads i'm afraid I might get bashed on here my doctor gave me a list of what foods to avoid and a couple foods I can eat . Can anyone please help ? I am trying to drink alot of water