gain muscle mass as a 20 year old woman

context:I am a young woman who went from being obese to being underweight, having dyspnotic symptoms and life events. I ended up developing an eating disorder and they took me to the nutritionist and he told me that I had to gain 6 kilos and he gave me a protein shake after coming in but I would like to know what that is for.