The results of this large population-based cohort study indicate that in patients with NAFLD and type 2 diabetes, GLP-1RAs and SGLT2 inhibitors are associated with lower incidences of macrovascular diseases and all-cause mortality compared with other glucose-lowering drugs. Here, SLC5A2 is linked to type 2 diabetes mellitus.