Low Serotonin levels is a core component for weight gain. Serotonin is the "happy" neurotransmitter. When levels are low, it leads to food cravings, especially carbs, in order to replace those serotonin levels.
This video by Evan Brand discusses the symptoms of low serotonin and what to test for.
90 % of serotonin is produced in the gut, so that should always be a major focus.