Ideas. Few things give me as much joy as a good idea. When a story goes along and there's a such twist that makes sense or the bigger picture is revealed, I usually get a chill and that's the sign of a great idea.
But where do they come from? It varies. Different people are inspired differently. Many people credit their muse. I don't. I have no muse. Or if I do, then she is a sneak thief that comes in the night, wearing all black like some special ops unit. Ninja muse, shall we say.
That point aside, my ideas are the result of my past and my experience; books I've read, movies I've seen, even music I've heard. It is all one and it all comes to bear when I create something. I purposely do research by reading widely. History is critical because I borrow heavily from the medieval period for things like how did government work, how did guilds works, the life of peasants, the size of the population, that sort of thing.
Plots for stories cook in the crucible of my mind. Some arrive fully baked; others skip the cooking process and arrive raw like sushi. For example, the original plot for the Aglaril Cycle, my fantasy series, arrived raw. I've had to put it in a kiln to blast away all the silly bits. One example of this is the main character, Evan Pierce. Originally he was a former demon hunter who was cursed and returned to his home town to live out his life. His former friends come looking for him because they have no idea what happened to him.
On reflection, that seemed silly to me. It is too melodramatic. So I simplified it a bit: Evan is demon hunter. He returns to his home town to rest after a series of hard missions. When he arrives in town he learns something that drives the plot forward.
Other ideas come at the moment of creation. For example, the map of Thalacia, (see the map link in the toolbar for the visual) was a doodle on graph paper originally. I wasn't trying to create a land mass for the stories I would write. In fact at the time, writing wasn't even a twinkle in my eye. Later, when I needed a place to set the stories, I remembered the doodle and filled in the terrain and vegetation.
Like many good writers, I also draw from my past when I need verisimilitude. For example, there's a scene with James and Iriel, a pair of lovers, in my first novel told from James's point of view. Much of his reaction is essentially my reaction to my wife because I gave Iriel, an elf, the same love of animals and desire to help others that my wife has. That's not too much of a stretch for an elf, I know but it fit so perfectly that the scene is great because it feels real. Anyone whose been in a relationship should recognize the feelings.
What will work for you? I have no idea. Everyone is different. You'll need to experience and try different approaches and different techniques. Most likely it will just happen when you least expect it. Suddenly an idea will seize you. Or you'll wake up from a dream and realize you had a great idea. Pay attention to these moments. They are rare gifts; jewels to be savored and enjoyed. Then run with them and see where they take you.