Certain medications such as metformin and SGLT2 inhibitors can be fairly effective in treating type-2 diabetes, but they don't really correct the underlying pathology. Lifestyle changes including increased exercise and greatly reducing carbohydrate consumption will do more over the long run and should be the first line therapy for patients with metabolic syndrome or pre-diabetes. Of course that won't be sufficient for some patients, and others are unwilling to make the necessary lifestyle changes.