Stories shouldn't naturally evolve through several different plots. If that's happening, there's probably one of the following goin on:
1 - You don't have a good grasp on how stories work. Stories aren't a random exploration of things happening. Stories are a cohesive sequence of related events through which the main characters react to and often resolve a conflict. That conflict may be internal (within the characters), external (within the characters' world), or both. The particular events and sequence of events in your story (story structure) depends on the type of story you're writing. Most stories (longer fiction in particular) follow basic story structure:
If your stories often evolve through multiple plots, it's because you didn't have a clear and solid conflict to begin with, or you didn't know how to explore your conflict effectively (via story structure) and you burned through it too fast. (See: Plot & Story Structure master list)
2 - You don't know why you're writing the story. There's always a reason we start writing a story in the first place. Nine out of ten times it's because we're hit with an idea and are inspired to follow it. But, believe it or not, most of the time there needs to be a greater purpose there. If you have a cohesive conflict and well developed plot, your story has a purpose in terms of what the characters get out of it. But what about what the reader gets out of it? Do you just want them to have a rip-roaring good time? Do you want them to feel like they've been sucked into the mystery with your investigator protagonist? Do you want them to feel less alone as someone whose experienced the same thing as your protagonist? Do you want them to feel seen or represented? Do you want them to walk away with some deep meaning or moral lesson? And what about you? What do you get out of this story as a writer? Are you writing it to explore an aspect of life, society, or a particular dynamic that is fascinating to you? Are you hoping of catharsis as you do a deep dive into an experience you yourself have lived through? Are you hoping to deliver a moral message that you feel is important to spread? Knowing not just what your characters get out of the story, but what your reader and yourself as the writer get out of the story is an important part of staying on track and staying motivated.
3 - You're chasing waterfalls, so-to-speak... meaning that rather than staying on track, you're leaving the plotted course in pursuit of prettier, more exciting things. Most of the time when this happens, it's because you're giving into the dopamine rush you feel when a new idea strikes.
Now, ideally you would write the idea down someplace safe, put it out of your mind, and put your focus back on your story. We do this every single day in life, because if we didn't, we couldn't go to school, have jobs, date, have social lives, raise children or animals... being a responsible human requires us to choose to do the thing we need to do rather than chase the sparkly fun things. If you have to leave for class in ten minutes but your favorite movie just started on TV, you have to make the choice to turn off the TV and go to class. You choose to stay on course rather than go off-track and do the fun thing.
However, many of us have a difficult time with these types of decisions for various reasons, such as neurodivergence, chronic illness, depression, mental illness, stress, and exhaustion. So, it's not always easy to make that choice, even when it just means taking the new and exciting idea and writing it down for later. One thing you can do in that case, though, is leave yourself a note in the current story about where you're headed next. What's the next moment, scene, or event you're going to write? Then, save it and set it aside and follow the new idea for a little bit by starting a new story. That way, you're not grafting this idea onto a story that already has its course plotted.
4. You need to be a "plotter". If you start out with a solid plot and story structure, you know what you want to get out of the story, and you're not letting yourself chase waterfalls, but you STILL can't keep your story to one plot, this is a pretty good sign that you need to be a "plotter." Now, there tends to be a little controversy over the whole "plotter" vs "pantser" thing, and that's mainly because everyone things their way is best and often forget there's actually a whole spectrum between plotting and pantsing. Either way, they're both a real thing, because some writers need to intricately plot their story down to timeline, scene list, glossaries, and bios, while others can just "write by the seat of their pants" and let the story develop as they right. Then, of course, there are writers who fall every which way in-between.
Some writers are inherently plotters or need some level of plotting in order to execute a story from beginning to end. Some can write with little to no planning at all. For some writers it depends on their phase of life or what they're specifically writing. But, if you find that your stories are always going off-track even if they're solid in your mind, you may need to do some solid plotting. Start by having a beginning to end written summary of the story and see if that's enough to keep you on track. If not, next time try the summary as well as a timeline of events. If that doesn't work, try the summary and timeline plus a scene list. And just keep adding things until you find the right amount of planning to keep you on track with your original idea.