Before you choose muscle gain as your goal, you’ll need to be prepared to gain some weight—and unfortunately, not all of it will be in the form of muscle.
To build any appreciable amount of lean mass, you’re going to need to accept that you’ll likely put on at least a little bit of body fat as well. This is because you’ll need to be in a calorie surplus (eating more calories than you burn) to build muscle most efficiently.
While there’s no way to guarantee that all of the extra calories you eat will be used to build and remodel muscle rather than being stored as fat, you can increase that likelihood by choosing a slow muscle gain setting and pairing that with a heavy weight training program.
It’s important to realize that there’s an upper limit to how quickly you can naturally build muscle, so choosing a more aggressive setting with a bigger calorie surplus doesn’t always translate into greater muscle gains. The law of diminishing returns, as it applies to your macro targets, kicks in hard here. Attempting to gain weight too quickly will put you at a higher risk for unnecessary fat gain.