It’s called epigenetics, where behavior triggers certain genes, which then pass those behaviors on to future generations.
Epigenetics, a very interesting area of study.(I think my parents passed on some of their Depression Era trauma to me, lol)