I agree with a lot that was said.
A positive energy balance is required to put on lean mass. In order to get enough calories, it would be best to include carbohydrates, along with fats and protein.
Carbs don’t make you fat. That is purely ridiculous and meta analysis of controlled studies show us that carbs does cause fat gain, it’s caloric intake.
Just understand if you want to put lean mass on, you do have to increase calories but you also have to do resistance training and train your muscles in order for them to grow.
And yes, you typically will gain a slight amount of fat when trying to put on lean mass.
But adding caloric dense, whole food carbs such as sweet potatoes and brown rice will help you achieve this mass gain. Try to add other whole food caloric dense foods such as avocado, nuts, and trail mix to help you gain more calories. Adding peanut butter to a protein shake is always a good idea too.
Best of luck!