https://www.cs.virginia.edu/~robins/YouAndYourResearch.html
A few points from it:
You've got to work on important problems.
How about having lots of `brains?' It sounds good. But great work is something else than mere brains.
The people who do great work with less ability but who are committed to it, get more done that those who have great skill and dabble in it.
The prepared mind sooner or later finds something important and does it. So yes, it is luck. The particular thing you do is luck, but that you do something is not.
One of the characteristics you see, and many people have it including great scientists, is that usually when they were young they had independent thoughts and had the courage to pursue them.