I encounter this problem a lot, giving that I usually write fantasy stories that require world building and a lot of planning. Obviously, plot holes happen to even the best writers, and this is my - humble - guide to help you get rid of them. I use this all the time, and it has been proven very effective.
The first step is listing all the potential plot holes. I do them in form of questions, but you can basically just list them however you find most useful.
So, example: How is Frankenstein Monster's body preserved in three hundred years so he can bring terror to the futuristic society?
And then you just think of a good answer. "Because Dr. Frankenstein develop a technology ahead of his time and froze his monster's body"
See? It's that easy. But wait... It might not be that easy. The hard part is recognizing them. How do you identify those damn plot holes? You tell someone else the story. The hole story? Yes, the hole story. And they will point out, "Oh, hey, but how is the monster awakened? Does he just simply decide he doesn't wanna be frozen anymore?". And that's how you know the obvious ones, that anyone in a first contact with the story can tell that are there. But the less obvious plot holes are a bit harder. How you find them? There is only one way I can think of: Revising., rereading and rewriting. You have to read your story and ponder about it, think about it in every way you can think of.
That's, at least, the way I do it. Maybe it wasn't as helpful as I thought it would be, but here it is. If you have any tips on how to avoid plot holes; tell me, my ask and submit are always open.