I want to write a story about a place called Kingdom Come, where you can come in but you cannot go (i.e. you are not allowed to leave). Has this idea already been taken? It really sounds like the sort of idea that has already occured to some writer. If so, can I considered a plagarist?
2The Eagles: Hotel California - lyrics Welcome to the Hotel California / ... / Last thing I remember, I was Running for the door I had to find the passage back To the place I was before "Relax," said the night man "We are programmed to receive You can check out any time you like But you can never leave!"– Stephen DaddonaJun 7, 2020 at 5:42
It's been done sufficiently there's an article about it: Closed Circle That said, just because it's been done before doesn't mean it can't be again. Ideas can't be copyrighted, just put your own unique spin on it.– Ben ThompsonApr 22, 2021 at 16:20
The answer to "Has this story idea already been done?" is always yes, regardless of what the idea actually is. Everything's already been done. In your particular case, the one example I can think of immediately is the TV show Once Upon a Time, where anyone who enters the town of Storybrook becomes unable to leave due to mysterious forces (there are probably better examples, that's just the one that came to mind).
Fortunately for you, ideas are not protected by copyright and cannot be "taken"; one person cannot claim a story idea and then prevent anyone else from ever using that same idea. So it doesn't matter one iota whether your idea has already been done or not. As long as your story isn't a blatant rip-off of an existing story, you cannot reasonably be accused of plagiarism (you can still be accused, but the accuser is unlikely to get anywhere). And as long as your story is good, most readers won't mind if it uses story beats they've seen elsewhere.
1You can always be accused of plagiarism. Down to and including accusations of plagiarizing works that were written after yours. (I mention this because it can be startling to new writers.)– MaryJun 7, 2020 at 4:07
All things are used at least once before. All ideas come from inspiration from different books. Some books may even have the same theme but different settings, characters, and most importantly the plot or styles.
A book called Cut Off by Adrianne Finlay is similar to the Hunger game by Suzanne Collins. The School for Good and Evil by Soman Chainani, Harry Potter by J.K. Rowling, and The Iron Trial by Cassandra Clare and Holly Black is all based on the topic of Magic Academies.
So no, you're not doing any plagiarism if you're just trying to collect some ideas for your book. No one is going to sue you for trying to let readers enjoy the book that you made your efforts on.