To kill a dragon you need a lot of prequisities - magic sword, ring of invisibility, knowledge of his weak point, skill, motivation and mainly you need a luck (which itself solve nothing, but enable you have all you need at the right time) and hard work.
There are two main schemes, how to obtain prequisities - one (usual in old sci-fi) is by planning for everything from start and make all the hard work to reach you goal (stalking the dragon, questing all failed heroes (or studining their remains), then you make list of subquest and go for them (maybe reiterating in frame of subquest - study, make plane, get prequisities), until you have all ready and then go and kill it. Your luck helps you in geting the right idea, making the working plan, meeting the right people, or even needed to have artefacts existing and know about them.
Basically it is first see the whole target, then work hard to get prequisities, then get the target as expected.
The other one (more usual in legends) is beigin "good person", take a few steps more to help somebody/discover something strange and getting prequisities as reward for those random subquests (help ants from good heart, the say "we will help you too" you say "whatever small onec, how it could be possible", then later suddently had to do impossible (find lost pearls in big meadow to the evening) and bam - ants came "you helped us, we help you" and as there is soo much of them, they can cover the whole area, and bring pearls one by one to you just in time). Your luck lies in beeing offered such subquest, go to do them and get seemingly unusable thing, which later turns to be plot-devices. When you meet the dragon, you are overhelmed by it, by in the dire situation you think fast (or other helps) and came with use all of such already existing bonuses to get unexpected result (kill the dragon). Your luck hits here too, that you use all you have in creative ways and it somehow works.
It is basically going somewhere, do a lot of (seemingly random, just by luck appearing) character-describing things, then came to big obstacle and combine all you get by luck and being good in creative way to overcome impossible and get reward.
To get great idea you also need some luck and lot prequisities - knowledge ( better from more different ares, which nobody would connect), skills (to know how it could work an to be able make experiments), tools (laboratory,library, electricity, spare junk ...) and such.
Again you can have big target (say antigravity) and study hard to find what all you need to obtain, study, train, than do it and finally be able to came either with perfect theory or working device. But it is lot of technical and you need the base idea from start, and reward is the idea in full and complete form.
Or you can have different target (say help disabled friend to live better) and go this way, make a lot of simple tools for him, then complicated one), which rewards you with a lot of knowledge, skills and equipped workshop+lab and one day you stumble on something unrelated (why this prostetic works erradically), when you notice, that there are some cross-interferrecies from your self-made devices, which make no sence at first, you try eliminate it, and there are still some minor problem, until you take another look at that and discover, that there is something strange, enhancing it to be better discoverable and eliminated, then you realise, that this small part yous floats in air - and bam, you realise, that it for some reason as by-product created antigravity - so you finally can solve, how to transport the friend from basement to higher floors conveniently. Well and by the way you discovered antigravity and then you can make as well rocket and take you two to the moon. And everyone else.
You get your big idea, beacause you collected enought sources (knowledge, skill, equip) to one place and with a little luck you realise something strange (which would not appear elseway) and got the BIG IDEA.
Ususally in such cases you stubmle on many ways, which simply does not work, they you see (hear, dream,...) something totally unrelated, which makes you to temporary put away all you was doing now and look at a problem from totally other side. And as you have all ingrediences already, the IDEA can just pop in your head and you finnally see, how connect strings and why the previous attempts must failed in hindsight.
Something like "when student is ready, teacher will appear" or as solving koan.