Here are some thoughts about writing stories. You may also find that some of these ideas work for other kinds of writing too.
1. One place ideas for stories start is hearing about something that has happened you or to someone you know or hear about on TV or in the news. If you have the thought that this moment would make a good story, you have to make the effort to capture it, freeze it, look after it. That might mean make a note of it in a notebook or on the Notes page on your phone.
Ask yourself why you think it's a good moment. What part or parts of it attracted you to it? You could 'dissect' it, breaking it out into who are the main characters, why did they do what they did, what's the most dramatic moment in the story, what did they each know of what the other thought?
Perhaps the story could be 'improved'! This means where you take a real story and invent things to make it more interesting, more dramatic, more poignant, more mysterious and so on. To make a decision about this, you'll need to decide, what kind of story is it? Is it a misfortune, an adventure, a romance, a disaster, a comedy - or what? This will help you shape the story in particular ways. Before, during or after writing, you will think of other stories that fit this kind or type or genre of story.
And what's the format: a short story? a novel? a film script? a TV drama? a narrative poem? or what?
Now, not in any particular order - and always remember you can change your mind about these - you can pick up on