Sugar is one of the ways you gain weight because sugar triggers insulin, the fat storing hormone, another way is eating too frequently we've been told we need to have breakfast, lunch and dinner. The problem with this is that eating in general triggers insulin. Lots of people gain weight from eating too much ultra processed sugary junk food and eating too frequently 2 meals or Omad (one meal a day) is all you really need. If you're very active and workout alot then 2 meals a day but make sure its spaced out 4 - 5 hours the longer you go without eating the more fat you get to burn.