I am a vegetarian and interested in gaining muscle, bone weight, and other non-fat mass. I do eat eggs but I plan to stop eating that too and turn to complete veganism. If I exercise less and eat more definitely could I gain some fat and muscle?
Gaining healthy weight is the same for vegetarians as it is for omnivores: lift heavy, eat big, prioritize getting bigger. The only difference is that vegetarians and vegans make it harder for themselves by not eating (or eating less of) some of the most useful foods: meat, dairy, eggs. These foods are great because high-quality versions of them contain good fats, lots of easily-absorbed protein, and they are nutritionally dense. This makes the difficult process of eating enough a little easier. If you refuse to eat those useful foods, then gaining weight is possible but necessarily some amount more difficult.
There are no special solutions. You'll still have to find a way to lift heavy, eat big, and prioritize getting bigger. You'll have to find a variety of healthy foods that get you the protein you need, while not making you so full that you can't eat enough total food. My advice is to at least eat ethically raised farm eggs and dairy alongside a variety of vegan protein sources like beans, soy, and so on.