Our study highlights that SGLT2 inhibitors offer significant benefits for patients with HF and T2DM, regardless of their ejection fraction levels. Here, SLC5A2 is linked to type 2 diabetes mellitus.