When a writer feels the need to ask others what to write, is that truly a sure sign that they need to change their story to something where they know what to write?
This is mostly a discovery writers problem; plotters can just follow their plot to the end. (Unless they have question marks in their outline; in which case, finish your outline before you start writing!) I am a discovery writer, I have no plot points, I write about my characters, things happen and they grow together.
For discovery writers, it means they need to change their story, yes. It means they have written themselves into a plot corner, or they have failed to write a strong character, or they have under-imagined a plot, or the stakes, or the MC's motivations.
It may mean that by writing 'realistically' they have prevented the MC from having any options, their story has become as boring as real life so they see no way forward. The MC has given up on their mission. That's a bad MC, MC do not give up!
The majority of stories are about somebody we like with a problem they must deal with. You get stuck when you feel like they have no options left to pursue.
It doesn't mean you have to write about something else, it means your character needs to be someone else; you need to backtrack in your story and change their decisions in a way that leads to a different outcome. You need to increase their resolve. You may need to be less "realistic", so at some pivotal point that you, as an author, knows is the last chance for the MC to win, they don't give up and actually break through.
Or earlier in the story, they get a lucky break and don't realize it; some piece of information they need to bring down the villain or conquer their problem, so when all hope is lost they recall this bit of information and pursue it as their last hope. And it pays off.
A story needs a structure. Read an earlier answer of mine, on Being a Discovery Writer.
There is a companion answer for discovery writers, on Starting a Piece of Writing, how to get through the first pages.
The most common structure is the Three Act Structure (3AS), although other structures can work, like four and five act structures, or the Hero's Journey (which fits perfectly in a 3AS, but has more specific turning points and character roles).
A summary is that a discovery writer tends to focus on a character more than a story, but their finished story must have all the beat points of the 3AS. An intro to the normal world, an inciting incident, that grows into a crisis that forces the MC out of their normal world. It must have the trials and failures, a breakthrough, a finale, and then either a return to the normal world, or the beginning of the new normal.
But it isn't necessary to plan all these points of the story first, you don't need a blueprint for the story to start writing. What you do need is some idea of who your MC is; what her big problem is going to be; and at least ONE idea for how this story could end.
In The Equalizer; Our MC hero is a retired CIA assassin. Mobsters in his neighborhood hurt one of his friends. He kills all the mobsters. The End.
That's all you need to start the story; a beginning, a middle, an end. A character, a problem, a resolution of the problem. The details can come later. You can think about the hero, and what type of person he has to be to have friends, and kill mobsters, and who his friends are, etc. Who is his friend that gets hurt? How? How to make the mobsters frightening and reviled by the audience. Who the worst of the mobsters are, so we can focus on a central villain.
But knowing the ending is like having a compass that points a direction you must travel in, for your writing. The MC is going to have to risk death, probably get hurt and go on to risk death again. He will have to be clever, and outsmart them, because he is badly outnumbered.
All of those things can be discovered as you write. If you write something that logically prevents your ending, then you need to come up with a better ending, or undo what you wrote. Backtrack until you find the decision or event that led you to your impasse, and delete starting there: You have made a momentous decision there without realizing it, and need to make it work out differently. But at least you know what to work on!
The vast majority of writers putting out stories about serial killers, rapists, mobsters, corrupt politicians, aliens, space explorers, secret agents, wizards and magicians and far future technology are not writing about "something they know." They may have done some research, but none of them have been all the characters they portray. Heck, approximately 100% of authors writing about men and women have only been one gender for their entire life. They are just guessing about one of those genders.
"Write what you know" is bad advice, it is far too limiting. Write a story that compels you, one that seems like you will have fun writing and imagining. Find a character that feels compelling to you, that you think will be cool to follow around on some adventure. Then think about them until they feel like a real person, and then you can find a problem that will compel THE CHARACTER to solve it at nearly any cost (usually because it threatens to upturn the 'normal world' you have already imagined for her). Then you have a beginning, and a middle, and all you need a a plausible way for the MC to solve the problem, and you are ready to write.
You can research what you don't know, that is what Google does. Write a story that really entertains you.
Begin your research with the 3AS (See Here and here for examples, perhaps Google it), it is straightforward and won't take you more than a few hours of reading to get the hang of it. You don't have to make a blueprint, but it helps to know where you are on the path of the story, so you don't rush things, or write conflicts out of place, and don't get bogged down or write in circles.
Besides that, just maintain a constant level of conflict in your story, it can be low, or trivial, or high life-changing conflict. By "conflict" I don't mean fighting, or even action, but there should always be a question in the reader's mind of "what happens next." How a conversation turns out, how a scene will turn out, how the chapter will turn out, how this Act will turn out, and how the book will turn out. We overlap these kinds of conflict so there is always something for the reader to be anticipating, in the short term, medium term, and long term. Wondering "what happens next" is what keeps the reader reading and turning pages, they need to find out.
So don't make everything easy for your MC; that is boring. She needs weaknesses and failures, even if there is something she is great at, she needs something she sucks at, to humanize her. Once she leaves "her normal world", you don't ever want her to rest for more than a few pages, she has to be working to fix whatever is wrong.