I'm about 60% finished with the second book in the Sam Darling Mystery series. Right now I'm sitting on the Panera patio, one of my two favorite places to write, the other being my sister Jan's gazebo.
Crafting the ending of a mystery isn't an easy task. you want the hero to solve the mystery but you don't want to make it too easy nor too difficult. It's hard striking the right balance. Oh, and it has to be believable. You can't take a normal human being and have them suddenly become a superhero at the last minute.
And you don't want to have the hero always being rescued by someone else. That's okay every now and then, but you want the hero to actually be a hero.
So this is one of the struggles of writing a book. I find short stories easier sometimes. You go in, do something, and go out.
In a full-length manuscript there has to be excitement throughout, but you can't have things get too exciting or the reader will expect an ending sooner than you have planned.
Actually writing a book is a bit like life. You do the best you can and hope for a good result.