"Evolution In population genetics and evolution, genetic memory represents the recorded history of adaptive changes in a species. Selection of organisms carrying genes coding for the best adapted proteins results in the evolution of species. An example for such a genetic memory is the innate immune response that represents a recording of the history of common microbial and viral pathogens encountered throughout the evolutionary history of the species.[10] In contrast to the somatic memory of the adaptive immune response, the innate immune response is present at birth and does not require the immune system to learn to recognize antigens. In the history of theories of evolution, the proposed genetic memory of an individual's experiences and environmental influences was a central part of Lamarckism to explain the inheritance of evolutionary changes. Animal behavior
In ethology, genetic memory refers the inheritance of instinct in animals"...
https://en.wikipedia.org/wiki/Genetic_memory_(biology)
Kitty cat's genetic memory and visual identification skills tells them spoon is a snake! - Why Cats Are Sooo Scared of Cucumbers?