When you have an idea, and a really good one. The best thing you can do is write it down. Dream Diaries, Notes, anything. When you have an idea, you have to write it down. Otherwise you'll forget.
Now the thing about these written ideas is that, its all over the place, like legit your idea might have been a scene you imagined, but it'd never work out as the start of a story or the end of one, its always somewhere in between.
But since you wrote it down the most important part is over, the rest comes later. Now a lot of people at this point rush towards writing an amazing story, and that one idea shines, but the rest doesn't. That's mainly because of the lack of planning. Just because its an amazing idea don't assume that it'll be brilliant and you publish it in one day.
No no, you have got to wait, plan, write, edit, repeat. Over and over, and even then its not over. Sometimes you think the idea is so amazing you don't see the flaws. I've noticed this a couple of times, a few amazing ideas, but when I come back in like a week, it looks terrible, the idea is still good but the writing which I thought at the time was fine, was actually disastrous.
1. When you have an idea, write it down somewhere
2. Plan the idea, don't rush off and publish it in one day
3. Wait, be patient, take a break and come back after a week, and read what you wrote, you might cringe.
4. Dream Diary, i've never used one, but I'm planning to.
Btw, this was done in less than 15 minutes with no planning, and it was an idea, and this could be disastrous, especially if i come back one week later and cringe.