This is pretty much the best answer. The more creative works you enjoy the more tools you have to tinker around with.
For example let's pick a completely arbitrary Star Trek TNG episode and make it work better in a fantasy setting. Season 5 Episode 15 is about a group of prisoners who have been converted into energy beings as punishment for their crimes trying to take over the physical bodies of the crew both in order to escape their prison and to regain the bodies they lost. At first the crew think they're helping what seem to be victims of an accident before realizing that they are in fact about to facilitate a prison break.
Already we have some really cool ideas for adventure plots. The idea of the party trying to help the villains by accident seems like a great idea and I enjoy the thought of having incorporeal beings pulling a fast one on the group. Since energy beings are a bit too scifi for a fantasy setting how about we swap them to be ghosts? And since ghosts are dead people it's pretty obvious that instead of being prisoners we can have them be bound spirits. Perhaps the party thinks they are helping a bunch of victims of a necromancers pass on to the afterlife when in fact the ghosts are members of a cult whose ritual went horribly wrong. Or maybe they were damned by age old clerics to haunt the mortal realm as penance for their crimes.
To introduce this plot TNG uses a distress beacon, the fast an easy solution to any space plot ever. We can substitute this as rumours and nervous villagers if we want to go a similar easy route or, if we want to be a bit more devious, slot it into any dungeon romp the party is currently engaged in. Perhaps they stumble in on the ghosts by accident while exploring some other plot lead?
This adventure could potentially end in multiple ways. Maybe the evil ghosts are released and the party has to immediately fight them to undo what they just did? Maybe the party realizes that something is fishy and turn against the ghosts? Maybe the party is actually super cool with releasing some evil ghosts into the world and they ally themselves with them to bring forth an age of death and misery? In the end it'll be the party who decides what ultimately happens.
And that's just a very straightforward adaptation. Once you have a large collection of ideas you can start combining them, twisting them, and mixing them up in interesting ways. Even if you don't do anything as active as this the stuff you've seen will be there in your subconscious to provide inspiration and a reference to compare against. An adventure to rescue a princess from a dragon probably didn't come to you out of sheer creativity. It came from having encountered the story before. Just start twisting it and playing with it to see what you end up with.
As for books, I've heard Save The Cat! is good. I've never read it myself though.