What vitamin can help to gain weight?

None. Eating more calories than you burn off causes weight gain. Eating fewer calories than you burn off causes weight loss. It's really that simple. The hard part, which takes a lot more discussion than this forum allows, is gaining or losing weight in a healthy fashion. That can be quite hard, can involve changing habits and changing life styles.
None of them. Vitamins don't have but a few calories, so they cannot help a person gain weight (if the person is in normal health already). The children's gummy vitamins have a few more calories. A person should take a regular once-a-day vitamins plus minerals, just to be sure he is not missing any vitamin. His primary care doctor can discuss whether of not he might need extra vitamin d, etc...