I consider six prime qualities to exist that make for a good plot.
For the audience to be able to root for the hero, it has to matter whether they win. There has to be something significant on the line.
Note that after a certain point, bigger stops being better. A story about saving the galaxy from certain doom is not likely to be any more powerful from that fact than a story about saving a few people. The reason is that the fewer people are involved, the more detail you can give to each one, thus giving the audience a stronger emotional bond with each person on the line. For the ultimate example, compare Doki Doki Literature Club to Mass Effect 2 - which one of these stories felt like it had higher stakes?
If the audience can tell what's going to happen next, it's going to be a lot less enjoyable for them. Imagine watching a recording of a tournament match in your favorite game. Wouldn't it just kill the experience if you already knew who was going to win and how?
This is part of why I wish people would write more tragedies. If there was any doubt in our mind before the end of the story that the hero would win and survive, it would make it feel a lot better when they do.
A good story is one that could plausibly happen in the world it's set in. It doesn't depend on coincidence or characters being stupid, and contains no plotholes.
A good story plays fair with the audience and respects their trust through the appropriate use of foreshadowing.
Another subpoint, which doesn't exactly fall under bad foreshadowing but is similar in its effect, and which you'd think wouldn't need to be said but some writers do it, is the practice of having the protagonist keep secrets from the audience so that the audience experiences an illusion of tension when there really isn't any from the protagonist's perspective, sometimes flashing back to the scene where they received the crucial information afterward. This is never a good idea and doesn't even solve the problem it purports to solve. As soon as a self-respecting audience sees your reveal they'll feel betrayed because not only can they no longer trust you as the writer, they can't even trust the protagonist. How are we supposed to be invested in a story when we know we've been lied to about what's happening in it?
This might sound like I'm saying something I'm not. Sometimes the protagonist comes up with a plan and then executes it in the next scene, and the writer doesn't want to have the protagonist explain their plan when they come up with it because then the next scene will be boring as the reader watches events unfold exactly as they were told they were. That's fine. Having the protagonist say they have a plan and then execute it without explaining it is fine. Having the protagonist clearly give the impression that they don't have a plan, that they feel cornered by the villain, and then reveal that they saw it all coming all along and actually have the badguy cornered - as happened in Solo - is where it becomes betrayal.
I also want to mention an example of good flashbacks. Final Fantasy 13. This game uses over a dozen of them and they're all justified. They don't use them to lie to the audience; they use them to gradually reveal a lot of history for each character that would have been horrible to dump all at the beginning.
- Hero Agency
The hero must be the hero of their own story. Their choices should steer the plot. If they don't, why is the story written from their perspective, instead of someone who actually matters? This doesn't mean the hero should always be successful; on the contrary, good stories generally involve a lot of failure. But the direction of the plot - especially the ending - should still be a result of the hero's actions.
- Villain Agency
Like the hero, the villain should be one of the main forces steering the plot. Sitting on a throne giving orders is not the best way to achieve this. The best villains are proactive, taking action, adapting their strategy as the hero learns and responding to threats.
Saren from Mass Effect 1 is a good example of this. He's introduced in the first mission of the game by name, given lines, and shown to be villainous. He takes action and moves around throughout the story and the player has a run-in with him on the third-last mission where he reveals his motivations. The final battle and the boss fight against him is not in his lair, but in one of the first locations of the game where major plot events happened. He's there for the same reason you are: to do something by hand, because he's an actual person and not an abstract force who only works through minions.