Anabolic pathways synthesize molecules and require energy.
Glycogen is synthesized depending on the body's demand for glucose and ATP (energy). If both are present in relatively high amounts, then the excess of insulin promotes the glucose conversion into glycogen for storage in liver and muscle cells.