Protein powders(whey, casein, etc) contain mostly protein.
Weight gainers contain protein and other carbs/fats to bump up the
calories. If you’re new to the gym, you wouldn’t really need it,
because you’re probably still in the process of adjusting your
nutrition to a better one. Concentrate on that first.