"Lamarck also recognized that species were adapted to their environment. He explained this observation by saying that the same nervous fluid driving increasing complexity, also caused the organs of an animal (or a plant) to change based on the use or disuse of that organ, just as muscles are affected by exercise. He argued that these changes would be inherited by the next generation and produce slow adaptation to the environment."
I’m pretty sure this is it. Giraffes started out as a “simple” species with “regular” necks but found they couldn’t reach the trees, so after years of stretching to try and reach the leaves, their necks elongated to the point where it was so environmentally favourable that giraffes were eventually just born with long necks.