Obesity and lack of exercise are risk factors for diabetes. Sugar is not thought to cause it, although there is some debate.
From Diabetes UK [1]:
> With type 2 diabetes, the answer is a little more complex. Though we know sugar doesn’t directly cause type 2 diabetes, you are more likely to get it if you are overweight. You gain weight when you take in more calories than your body needs, and sugary foods and drinks contain a lot of calories.
WebMD [2]:
> Eating too much sugar does not cause diabetes. Diabetes begins when something disrupts your body's ability to turn the food you eat into energy.
Montreal Children's Hospital [3]:
> True or False? Sugar causes diabetes.
> False. It’s a common misunderstanding that sugar causes diabetes. It doesn’t.
From Diabetes UK [1]:
> With type 2 diabetes, the answer is a little more complex. Though we know sugar doesn’t directly cause type 2 diabetes, you are more likely to get it if you are overweight. You gain weight when you take in more calories than your body needs, and sugary foods and drinks contain a lot of calories.
WebMD [2]:
> Eating too much sugar does not cause diabetes. Diabetes begins when something disrupts your body's ability to turn the food you eat into energy.
Montreal Children's Hospital [3]:
> True or False? Sugar causes diabetes.
> False. It’s a common misunderstanding that sugar causes diabetes. It doesn’t.
[1] https://www.diabetes.org.uk/guide-to-diabetes/enjoy-food/eat...
[2] https://www.webmd.com/diabetes/qa/does-too-much-sugar-cause-...
[3] https://www.thechildren.com/health-info/conditions-and-illne...