I want an animal that gets harder to kill as it grows older, biologically immortal.
Every time the animal passes different stages of its potentially endless life, it can choose to "upgrade" its own DNA. Children born from older animals are already born upgraded but can choose more upgrades if they manage to survive. This mechanism makes the animal harder to kill as it grows older.
The upgrades can be anything from decorative displays, higher conscious and subconscious intelligence or various health and strength factors like thicker skin muscle tissue, looser skin to resist bites and scratches or more stiff tendons and cartilage to increase strength at the cost of flexibility or vice versa.
Thought process
There's no doubt that the children you have in your youth will be different to the offspring produced in more mature ages, not only because of the degradatory process of aging but also because genes change and mutate as time passes. Virus immunity is nothing but evolution of your body, often instantly.
So evolving in one lifetime is not impossible, after all evolution merely means change and growth, development.
In video games sometimes there are infinite randomly generated dungeons that get harder and harder as one explores more, and the playable character will find powerups to keep up with the difficulty. This is not done to make the game eventually be impossibly harder but to force the player to continuously adapt to new environments and ever changing challenges; it's made to kill boredom, not to kill the player.
Often the player finds more than one powerup and has to choose between them to make play styles variable. Maybe this round you choose 3 bonuses for speed, agility and intelligence but the next you want to try toughness, vitality and stamina. In this way, the dungeon feels unique every time.
I want this game's mechanism to be part of an animal's biology.
Question
How would this be possible? By that I mean how would the mechanism work and what would enable it to function correctly?