Weight Gain 😡

So I had an appointment on Monday, and I asked the Dr. how my weight gain was, and she said that I've already gained 20 lbs (I'm 23w2d) and that I should start watching what I eat since I am only a little over halfway and only have 10-15 lbs left of the recommended weight gain. I'm 5'6 and started at 144, and am now 163. Has anyone else been told this and what have you done?