In this cohort study with 13 799 participants, initiation of SGLT2 inhibitors was associated with a 19% decrease in incident anemia risk compared with initiation of glucagon-like peptide-1 receptor agonists. This evidence concerns the gene SLC5A2 and anemia.