Yes, that is quite obviously luck. People don't get to choose your parents. You were lucky enough to have parents that taught you about investing at an early age.
Hard work and luck are both parts of success. Humans just have a tendency to downplay the luck aspect.
I'm not saying it's all luck. Hard work is important. Luck is also important. It's pointless to argue over which is more important in my opinion.
However, a lot of successful people (including the person I was originally responding to) downplay the role that luck plays and exaggerate the role that hard work plays.
My dad taught me about investing when I was a teenager. I actually applied this for the next 20+ years. Was this luck?