What is expected? To have fun.
Obviously, you aren't having fun if you are writing up posts like this.
What you are missing
The major thing that it sounds like you are missing is a big chunk of early content.
The DM should have directed you to deal with a problem in Phandalin, before you set out to deal with threats and issues elsewhere.
If your DM has not mentioned the Redbrands, that is a major error on their part. The fact that you mention other places and encounters but make no mention of this suggests that this is likely the biggest single problem.
Some people may consider me telling you this to be a little spoiler-y, but in reality, everything here is pretty heavily indicated for anyone that plays this adventure.
4 of the 5 pre-generated characters for this adventure have backstories and alignments that would make you want to deal with the Redbrands. Two of them have explicit Personal Goals that would have pointed you to deal with them, while the other two have alignments that would have pointed you in that direction as well.
The DM should have either helped you build backstories that incorporated some of those things, or otherwise provided additional clues and direction to you to make sure you dealt with the Redbrands sooner rather than later.
If they didn't have you encounter some Redbrands in the streets of Phandalin, then they are "off script" from the published adventure. Going off script is okay, so long as the DM compensates challenge and story-wise.
I consider it a major error if the DM is not modifying the difficulty of the encounters to adjust for the fact that you bypassed early content, and also did not add additional nudges to get you to go to that early content. I don't know if either of those cases are true, as you aren't expected to provide a full transcript of your adventure to us, but the lack of any mention of this concerns me.
How the encounters you mention should have gone
Note: This section contains minor spoilers to the adventure for content the OP has already completed. However, even for any players who have completed this content, be aware that your DM may not necessarily want you to know this information, or may have modified it for their running of the adventure.
The first part (Cragmaw Hideout)
I assume by the first part that you mean the goblin cave where you (hopefully) rescued Sildar and (potentially) defeated a bugbear.
If you barely survived, that is great on your part. By the published adventure's guidelines you were level 1 at that time, and for just three level 1s to complete that cave is a major victory. Good job. Both the players and the DM did well.
The tower well (Old Owl Well)
This encounter can be dealt with in many ways, but unless your characters leaned on the evil/murderhobo side of things, talking things out was the intended solution. In fact, the NPC that directed you to this place should have simply asked you to find out who was there and what they were up to -- not to go kill anyone and everything that is there.
So, talking your way out was good and it was good that the DM allowed or encouraged that.
The orcs (Wyvern Tor)
I calculated the difficulty for this encounter by using the DMG's Creating a Combat Encounter section on pages 81-84.
That section helps DMs craft encounters of appropriate difficulty for a given party, ranging from Easy to Deadly. Here is the description for Deadly:
Deadly. A deadly encounter could be lethal for one or more player characters. Survival often requires good tactics and quick thinking,
and the party risks defeat.
Note that this does not mean that you should never have Deadly encounters. In fact, if your only encounter for the day was a Deadly encounter, that is actually a pretty appropriate encounter to throw at a party. Given that the encounter at Wyvern Tor requires travel, you (ideally) should have been full up on health and spells when you reached it.
That said, an encounter is Deadly to your current party if the Adjusted XP (not awarded XP) is 800 or more. The encounter at Wyvern Tor has an Adjusted XP of 2625. That is over triple what counts as Deadly.
In other words, at your current level, you were meant to run.
What would have been a roughly appropriate party to deal with this?
Six level 3 characters, or
five level 4 characters, or
three level 5 characters (in which case it would actually only be a Hard encounter.)
For a party of three level 2-3s, you were definitely meant to run and deal with this later.
Did you actually run away successfully? Then both you and DM did well in your roles.
How to start having fun
How people have fun in D&D varies a lot, but for most people it at least partly involves combat victories. You say you assume defeating the opponents counts as winning, so likely your personal inclination is towards combat (otherwise, you probably wouldn't be interested in playing D&D).
Deal with the Redbrands in town
This advice is very pointed, but I feel it is necessary to help get you back on track, since your DM apparently provided enough direction for you.
Go back to Phandalin, deal with the Redbrand threat. If you aren't sure what that involves, try talking to NPCs. The published adventure gives a lot of direction to the DM to have the NPCs in town all be concerned about the Redbrand threat, and many will point you to where you can encounter them.
Your party should all be level 3 by the time you finish that part of the adventure. Some of you might even be up to level 4, given that there are only 3 of you and that you have completed other encounters as well at this point.
Talk to your DM
As mentioned earlier, it looks like your DM made a major mistake in not having you deal with the Redbrands first. While ideally a DM shouldn't railroad their players, they should also be giving plenty of hints and direction, especially since the published adventure gives so many for them to give (especially in the backstories.)
That said, don't be confrontational. DMing is HARD. I know, because I just finished up The Lost Mine of Phandelver myself, with just 2 players. Adjusting difficulty for them took a bit of trial and error. I know at some points I wanted to say "just be more creative" to my players, but they were new too, and so didn't really know what was an option.
Ask your DM to provide some examples of how you could have handled past encounters. D&D 5th edition is very much meant to have both the DM and the players working together to create a good story that is enjoyable to everyone. It is not meant to be DM vs the party, so the DM should be willing to provide some more explicit examples of what he thought you guys should do.
If you didn't get many clues that the Redbrands were the "intended" objective you were supposed to follow, tell that to them. Go ahead and direct them to this post.
The DM was provided with explicit instructions to have the Redbrands seek out the party if the party did not show any interest in dealing with them. If you didn't have an encounter in the streets of Phandalin, or if you didn't understand that there was a whole huge gang beyond just the few you fought in the streets, then you should tell the DM that.
They may not realize that they were being unclear. So, talk to them, figure out where the disconnect is. Perhaps they just skimmed too much and have already realized their error.
Optimize or improve your party composition
I think your party should be able to handle this campaign decently, so long as you make sure to be cautious and continue to retreat or talk your way out of problems. You can always return to deal with encounters once you have leveled up a little bit more. Once you hit level 5, all the content should be able to be handled by your group, at least with a bit of care.
That said, a party of 3 is not ideal for an adventure balanced for 4-5 characters. As pointed out in another answer, you are lacking in either healing or tanking.
If your Druid is a Moon Druid, you could have them cast Goodberry, give most of the berries to the other characters, and then Wild Shape into something that can hold off the enemies while their allies dish out damage.
Alternatively, if the Ranger is more of melee type they could take some of the meatshield role, while the Druid heals.
If neither of those works, you could always ask the DM to have the pre-generated Dwarf Cleric waiting at the inn back in Phandalin. That character is great on defense and healing, and even has a personality trait of "I don’t trust my gut feelings, so I tend to wait for others to act", which strikes me as perfect for an NPC to help out a party. They even have a personal goal to get you back on track with the Redbrands, if your DM is so inclined to help you out in that way.