“Is this fair” is the wrong question. Ask yourself “am I having fun?”
From what it sounds like, your DM is invested in a “DM vs. Players” style of running the game. This sort of style can work when the players have bought in beforehand. Generally speaking, D&D is intended to be a cooperative effort between the players and the DM. This is spelled out clearly in the Dungeon Master’s Guide:
The D&D rules help you and the other players have a good time, but the rules aren’t in charge. You’re the DM, and you are in charge of the game. That said, your goal isn’t to slaughter the adventurers but to create a campaign world that revolves around their actions and decisions, and to keep your players coming back for more! If you’re lucky, the events of your campaign will echo in the memories of your players long after the final game session is concluded.
The success of a D&D game hinges on your ability to entertain the other players at the game table. Whereas their role is to create characters (the protagonists of the campaign), breathe life into them, and help steer the campaign through their characters’ actions, 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. Once you know which of the following activities each player in your group enjoys the most, you can tailor adventures that satisfy your players’ preferences as much as possible, thus keeping them engaged.
It sounds like your DM is more into the “slaughter adventurers” style, and as I mentioned previously, this can work when the players and DM have communicated about this and agreed upon this play style.
If you aren’t having fun, you need to have an out of game conversation with your DM. Approach them humbly and politely, explaining how you have perceived the way the game is being played, and that you are not enjoying this experience. This is not a “your DM style sucks” conversation. This is a “I’m not having fun, how can we work together to increase the fun for everyone at the table”.
And if it doesn’t work out, it doesn’t work out, and you may have to find another table. In my experience, successful D&D games are the ones where the players and the DM are in constant communication about how things are going, what works and what doesn’t, and how the experience can be improved for everyone.