You’re definitely thinking of T1, or health class and the Internet lied to me all my life. Come to think of it…
But for sure you can get T2 from making unhealthy choices with sugar consumption.
Unhealthy food choices in general can help cause obesity which increases one’s risk, as does age; still largely hereditary. How do I know? My maternal grandmother was type 1 diabetic, my mother was T2, myself and all three of my siblings are T2. It’s part of the counseling after your diagnosis. It’s probably better to listen to health care professionals instead of folks on the internet.
Anecdotes are not science.
Obesity and poor diet together do increase the risk of T2. There is a hereditary aspect to it but T2 is 100% a result of lifestyle or other diseases. People don’t spontaneously develop T2 diabetes without eating too much… and sugar is the primary cause of the metabolic imbalance that results in T2 diabetes. It’s not fucking magic that the A1C level is tied directly to your sugar and simple carbohydrate intake… it is literally the result of using carbohydrates as fuel for your body.