No weight gain yet 5 7 165

18 weeks. How can I prevent gaining weight? Can I just eat salads maybe ?