Help!

Does anyone follow a specific diet plan to help gain muscle? I think I’m doing something wrong. I haven’t had a period in 2 months and my hair is falling out. When I try to eat more calories my stomach gets upset and bloated and then I equate that with weight gain and belly fat. I’m gluten free, dairy free, alcohol free and grain free.