One of the special challenges with writing sci-fi or fantasy is that sometimes, your dreams are way too big to confine to one book.
And that’s a wonderful thing, in a way – if you write this universe and you populate it with compelling characters and adrenalin-rushing situations and your readers are right there invested along with you, you can keep going and going and going. Look at Cassandra Clare and The Mortal Instruments. That was set to be a trilogy and it’s branched into an entire franchise for her, because she painted that universe so well.
But still – you’ve got to know how to harnass that, channel it into a working outline for a cohesive book with a beginning, middle and end.
One of my favorite old quotes is “Books have endings. Stories don’t.”
In other words, it’s okay to structure your book and write it to its end. And it does have to end. But the bigger story that it fits into can go on, so leave yourself some breadcrumbs to call back to, just in case.
And don’t go getting so lost in your universe that you forget to finish your book.