Aristotle and character motivation
One of the first things I learned in college, which I didn't already know from high school (our high school was pretty good so the first two years of college were mostly an advanced review), was a quote from Aristotle's Rhetoric. Aristotle wrote, "There is an object at which all men aim in any action which they choose or avoid; and that object may be called happiness or possession of The Good."
I capitalize The Good because it is an interesting word in Greek. Aristotle combined two Greek words translated "good" in English to create a concept unique to his writing. One is Kalos meaning "good, useful, beautiful, practical, and well made." The other "agathos" means "morally good, righteous, ethical, justifiable." In other words, the actions we take are motivated by what we perceive as being both desirable on a material level, as well as, morally right.
So, what does this have to do with fiction writing? Your characters do things. The question you must ask before they do them is "Why?" We have all read bad literature where characters just do things to advance the plot without there being no clear motivation for them to do so.
One cliché from the movies is the shy, wimpy, scaredy-cat woman, who, upon hearing a noise in the room down the hall, instead of calling 911 and running out of the house, takes a flashlight and opens the door to the room to see what's going on.
We all say, "Give me a break!" We know it is out of character for her to do so. When we ask what this character with this personality expects to achieve by doing such a "courageous" act, we don't know.
Now, if it has been built into the script that she has called the police one too many times about imaginary threats, and she is trying to overcome her own paranoia, then it makes sense for her to do this possibly foolhardy thing. Her concept of The Good (overcoming her fears) outweighs the threat.
Go back to each of your characters and ask yourself, "What is this character's concept of The Good in this scene. What do they hope to accomplish? How will this act help them achieve that?" If you can't come up with a satisfying answer, then you need to revise either the character or the plot so that the action makes sense.
Many fictional villains, especially those in action-oriented fiction, seem to lack motivation. The classic is the one where the villain decides to do something that will destroy the world. Hello! You are on the world you are ready to destroy. Unless you write into this characters arc that he is suicidal, you have a real problem with motivation. At a less obvious level, why do the bullies in the youth novel harass the kid? What does the drunken husband expect to accomplish by drinking? What is the concept of The Good that drives the evil brother to the king in the fantasy novel to attempt a palace coup?
In other words, ask yourself, "What do my characters want when they do things?" Write according to your answer.