It's like how infants inherit the instinct to cry and suckle. Inheritance of learning would be if the mother (since childhood ) was taught to wink and she'd get more attention and food/milk and her infant winked at her instead of crying when the infant wanted attention.
Building a little (but speculatively... I don't know much about wasps and their nest-building instincts): I often wonder what (if any) fractions of behavior that gets chalked up to "instinct" are actually the result of some biological/mechanical affordance, normal learning, and reasoning.
(I don't mean to deny instinct as such, but I guess I feel like the razor should exclude it until it's the only option left?)
To use the hexagonal example, the term "instinct" implies that the creature could do this thing in a variety of ways, but doesn't. But it wouldn't quite be "instinct" in the sense we mean it if the hexagonal structure is just a coincidental emergent byproduct of some detail of the species' visual system, physiology, etc.
Many other animals have much more complicated instincts, but even then you can often see the instinct starts as something very simple. A fawn "knows how to walk" at birth, but, look at video of a fawn at birth. I say it's a lot more like "a fawn knows to recognize it is falling and trigger an only-modestly complicated reaction to stab the closest leg out in that direction", a neural circuit so simple with a bit of effort you could almost assemble it by hand in some sense. A little bit of control circuitry on top gives it a small amount of mobility.
I think one of the reasons "nervous systems" are so evolutionarily successful is that they do give that mechanism to go from simple instinct to a much richer learned behavior, and it's obviously a combination of many things to get to that point. It's amazing how some of these things work on not necessarily all that many "instincts".