Their average life expectancy is around 70 years, and yes, cancer is rarer in elephants, potentially due to the species having extra copies of the TP53 gene.
Cancer is also a result of many other factors of which humans are more exposed to than elephants typically are, environmental and pollution being a major one, and food ingredients being another. A life expectancy of 70 years for a human isn't that great; in 2024 in Europe it was 79 years for males and 84 years for women, and that's with all the contributing cancer risk factors in society as mentioned earlier.
A more interesting species might be immortal jellyfish, but the simplicity of the organism might be a contributing factor in why it works the way it does.