I may say some stuff that will contradict what
@DANDAN_THE_DANDAN said but here's some overall tips:
1) Plan out the plot progression BEFORE you start writing.
Many great works have ruined themselves by not planning out how they want their story to go and what is the most natural and logical progression for a narrative to flow. For a modern audience, plot consistency and the avoidance of major logical or narrative inconsistencies is very important and you'll want to write a story that gets better each time you read it, with good, subtle foreshadowing and strong, logical progression of events. Planing what major scenes and concepts you want to explore before hand lays out a solid piece for further progression, especially when diving into the more complex parts of literary analysis, such as symbolism and reoccurring themes.
2) Diction
Precise use of words is important to capture the essence of what you wish to say. Rhetorical devices will help in this but diction is your go-to for writing as it can mean the death of your work or the thriving of it. Take the difference between "ran" and "bolted." The former is probably not going to be preferred if you wish to imply a sudden, and immediate jolt across the ground and wish to have colorful imagery, but there will be situations where less complex and simple diction will be most effective, as mixing up sentence structure and syntax helps to keep a reader invested. If you make a point, it is best to finish with words that are not overly flowery and more down to earth, and non-abstruse to understand, or if you wish to characterize some one as being not so smart or not as well educated, them saying "I ran down the street like hell" would have less of a clash than "I did scamper ever so gently down that street, good sir."
This is not even including connotative vs denotative, in which two words can carry the same meaning but have different impacts on the audience, such as "taken" vs "stolen" or "butcher" vs "kill." They can mean the same thing but have very different amounts of weight with the audience and using this can help both characterize people by showing what language they use and what that says about them or the overall themes of the work, if you want a solid example of this, checkout Ralph Ellison's Invisible Man which uses its diction to imply subtleties and lay its reoccurring themes every well. How you communicate the idea is everything in writing, and can create either a masterpiece or a disaster, with unclear language or imprecise diction meaning the end of your work.
3) Know what you are writing about
Do your homework, check sources. Bad information can take people out of an otherwise good story and haphazardly throwing in information and exposition that has no actual basis in something, like the "humans only use 10% of our brains" myth, will immediately take people out of the story. Instead, basing your information and plot in something that is reliable and that is based in truth will strengthen a work more than harm it. Saying in a novel "pee is stored in the balls' and using that to advance the plot will harm your story unless its an absurdist comedy. Likewise, if you go too much into non-meaningful exposition on a subject, like describing how a gun works to its subatomic level, then you will lose your audience completely.\
4) Good Characters are not hard to categorize
There is no one set for what is and what is not a good character and it is entirely on how you display them. You should have your characters fully realized and understand how they would react in any given situation before you set pen to paper, and then find the way to best communicate that to the audience. Static vs Dynamic and Flat vs round are not indicators of quality necessary. Sgt Johnson from Halo is a static flat character, but he is universally beloved because of his characterization. Though, you should mix it up and have some characters who have arcs and do change and some who are more deeply realized than others, though may not change.
Similarly, morality is complicated. An immoral protagonist will need more justification for their actions and the ability for the audience to empathize with them is important. A person can do nearly anything, but we need see the process of their thinking and what the limits of the rational and moral code is. It's also relative to your setting, in this case. In a universe where Fascists rule and crush every little bit of hope and opposition as corrupt bureaucrats rape and butcher helpless civilians, a rebel who cares little for human life and is more invested in revenge against the system and sending a message to invoke fear and commits acts of terrorism may be seen as moral, but would not work in another setting. It would also be bad if he committed immoral acts that would go against this goal such as raping a random woman or killing puppies.
Though, it should be noted the overall theme is strong and clear motivations and understanding why characters act and think the way that they do. In a romance story, we need to see chemistry between the characters, why they fall for one another, and why specifically they like one another within their own personality, or how they change through their arc. If they wrong one another, they need to address it and either solve it or work past it and face repercussions for their actions. No significant action should not have a consequence. In an action story, we need to know what motivates the hero, what compels them forth and why they care about the situation. We need to know their moral code and potentially even philosophy depending on the circumstances, which ironically also is fitting for villains and for horror characters. All of these aspects will increase likability and audience investment in your story
There will probably be more but this is the major stuff for now. I'd suggest reading everything you can and getting a grasp on what story elements you like and dislike and why you do or don't like them. Works of literary merit are especially helpful, but also history and philosophy will expand your writing capabilities because it allows you to base things in more substantial logic and fact. (Otherwise follow what DANDAN said in conjuction)
@Kamuisan