This cohort study evaluates whether older adults with type 2 diabetes and cancer have improved survival when taking glucagon-like peptide-1 receptor agonists (GLP-1RAs) compared with sodium-glucose cotransporter-2 inhibitors and dipeptidyl peptidase-4 inhibitors. This evidence concerns the gene GLP1R and type 2 diabetes mellitus.