What went wrong
Looking at your three examples:
- Was this really a campaign, or just a series of adventures linked by common characters? If the latter, there is nothing wrong with that but the rewards you get are the fun you have at the table; not the thinking and planning that you do between sessions that a good campaign generates.
- I have been playing D&D for 35 years. Lost Mines of Phandelver is one of the best published adventures/mini-campaigns that I have seen. If you found it slow and boring then I would suggest that that is a problem with the way it was played rather than the material itself. This is not a criticism; you're new to this hobby and lacking the skills and experience that allow you to see how to turn this into a great campaign for both DM & players.
- What you have here is a miss-match in expectations; you expected problem-solving, they wanted fighting. Stuff like this happens and it changes too - sometimes I want pizza and sometimes Chinese food - its all good but give me pizza when I want Chinese and I won't enjoy it as much.
There is no right way to play D&D!
The 5e DMG has some of the best advice on this on p. 6; read it in full and take it to heart. A summary:
Know Your Players
The success of a D&D game hinges on your ability to
entertain the other players at the game table. ... your
role is to keep the players (and yourself) interested and
immersed in the world you've created, and to let their
characters do awesome things.
Knowing what your players enjoy most about the
D&D game helps you create and run adventures that
they will enjoy and remember. ... know which of
the following activities each player in your group enjoys
the most ...
Talk to each other about what each of you want out of a campaign. If you want you can even use something like the same page tool.
Irrespective of whether you are just playing adventures, using a published campaign or making your own campaign use a lot of what everyone likes, a little of what some people like and little to none of what everyone hates.
How does D&D work?
Luckily for you there D&D is really easy, how to play is on page 6 of the Players Handbook:
- The DM describes the environment.
- The players describe what they want to do.
- The DM narrates the results of the adventurers’ actions.
1. The DM describes the environment.
You have to know what it is!
There should be noting as a DM that surprises you except what the players do.
If you are using a published adventure you have to have read the module, preferably twice, and reread the bit where the PCs are up to just before you start playing. If it is your own material, you will spend more time preparing it and less time reviewing it.
For example, when I prepared to run Lost Mines of Phandelver I made this:
This is a mind map of the major NPCs, factions and places in the module showing how they were connected. I can look at this and know if they are talking to X then he is connected (in some way) with A, B, C & D - this is enough of a trigger (for me anyway) to allow me to remember what the NPC knows without having to thumb through the book.
You have to communicate it!
There is an inherent information imbalance in D&D: you have the information and the player's don't. You need to communicate succinctly the important information the players need to make informed decisions at both a tactical and strategic level. So, describe the things (people, places, traps, objects etc.) and let the players tell you what they want to do with them.
If, for example, your players aren't keen on acting then it is perfectly OK for them to arrive in town and you to say: "You spend the night in the inn. You meet George the barkeep, Natasha the half-elf Rogue, Fred the Fighter and Sam the dwarven cleric. George tells you about the mad necromancer out at the Old Owl Well, Natasha is looking for help clearing goblins out of some castle, Fred is looking to hire on and is keen for anything and Sam is having trouble with orcs.
2. The players describe what they want to do.
The need to know what the choices are: in combat this is easy because the rules limit them; in social interaction and the general "What do we do next?" situation you should have given them the information they need but not so much they can't see the forest for the trees.
It is perfectly OK if they are floundering to recap their options. For example: "You can:
- go to the Old Owl Well,
- go to the goblin castle with Natasha,
- hunt some orc with Sam,
- do something else but we might have to shelve D&D for tonite so I can prep that, and
- whatever you choose you can take Fred with you or not."
3. The DM narrates the results of the adventurers’ actions.
The "Don't bore us, get to the chorus" rule aka the "Cut to the Chase" rule
D&D is about player decisions, its not about DM storytelling: if you want to tell a story, write a novel.
Continuing the previous example: if the player's say "Let's go to the Old Owl Well and check out the mad necromancer" then BANG, unless there is something interesting about the journey, you say "You are at the Old Owl Well and you see ..." The point is to move quickly over the parts where the player's do not have decisions to make.
Decide does not (necessarily) mean roll
Only roll dice where there are consequences of failing: if the players want their character's to do something that is within their capabilities and they will succeed at eventually then they do it; if it is something they can't do then say "You can't do that, but if you did X or Y that may give you the result you want." This is necessary because of the information imbalance; in real life we get feedback that tells us if we will eventually succeed at a task, in a RPG the DM is the feedback.
Two final points:
- you don't get graded on any of this,
- make sure everyone has fun!