If you hate what you're writing or are stuck with it, leave the thing alone for a couple of weeks, maybe even a month. When you come back to it, watch as epiphanies strike you from every angle and you suddenly understand exactly how you want your story to be.
But this really only works well if you're also an avid consumer and student of stories, only if you've developed a bit of a critical eye. If you've got no taste, then you'll just come back to your writing, flop around for a bit, and leave it again in frustration.
And on that note, be eclectic. Just like how only listening to radio pop makes you a vapid, unensouled individual, only reading one type of story or only appreciating a couple of artistic mediums will make you a shallow artist. Having a broad range of influences helps to mold your unique style, and being autistically obsessed with your influences will help you wield your style with confidence. Time to put down that isekai monster slave NTR system webnovel and pick up a shoujo reverse harem manga for a change.