If you are thin and want to gain muscle, then you must do more strength exercises, such as bench press, pull-ups, barbell rowing, squats and so on, so as to gain muscle. Aerobic exercise is very important to improve cardiopulmonary function, but the volume of red muscle will not increase significantly, so if you want to have a large muscle mass, aerobic exercise can't give you any significant help.
In addition, diet is also very important. If you want to gain muscle, eating is more important than practicing. Practice three points and eat seven points! There are two different diets: protein and carbohydrates.