There aren't any ways to avoid blunders in the openings. That's because, first, you have to get a lot of experience in exact opening to play it without huge mistakes, second, you should learn huge amount of opening theory. It takes a lot of time to pass an opening with no blunders at all.
How to avoid Opening Blunders?
Choose an opening and study it. After that play it in the real game. Then analyze the game and search for mistakes. Try to find a cure for your mistakes. Repeat. When you will get enough experince - try to analyze Master Games at your opening.
You can run "Engine" analysis on these moves and pick better ones. Note, you can do this in preparation not during the game itself.
Be carefull with that) It's better to think by yourself. If an engine says you can capture the pawn, for example, in french defence - it doesn't mean you should do it. I state that your engine can defend from every attack possible, but you will lose in 10 moves.
By the way I think the best way to learn any opening is to buy (download) a book for your level. In the book you can find general lines and ideas of the opening. So that will help you a lot at the start. Using an engine is hardly helpful for beginners.
"... for those that want to be as good as they can be, they'll have to work hard.
Play opponents who are better than you … . Learn basic endgames. Create a simple opening repertoire (understanding the moves are far more important than memorizing them). Study tactics. And pick up tons of patterns. That’s the drumbeat of success. ..." - IM Jeremy Silman (December 27, 2018)
https://www.chess.com/article/view/little-things-that-help-your-game
"... For beginning players, [Discovering Chess Openings] will offer an opportunity to start out on the right foot and really get a feel for what is happening on the board. ..." - FM Carsten Hansen (2006)
https://web.archive.org/web/20140627114655/http://www.chesscafe.com/text/hansen91.pdf
Detailed suggestions are provided by Moret in his My-First-Chess-Opening-Repertoire books.
https://www.newinchess.com/media/wysiwyg/product_pdf/9033.pdf
https://www.newinchess.com/media/wysiwyg/product_pdf/9050.pdf
https://chessbookreviews.wordpress.com/tag/vincent-moret/
Opening Repertoire 1 e4 and Keep it Simple 1.e4 are somewhat similar sorts of books.
https://www.newinchess.com/media/wysiwyg/product_pdf/7819.pdf
https://www.newinchess.com/media/wysiwyg/product_pdf/9068.pdf
Openings for Amateurs by Pete Tamburro (2014) combines explanation of principles with starting opening suggestions. Of necessity, his opening descriptions are less detailed (than those of Moret) because he tried to offer choices to the reader and give some indication of how a player might choose what to try.
http://kenilworthian.blogspot.com/2014/05/review-of-pete-tamburros-openings-for.html
https://chessbookreviews.wordpress.com/tag/openings-for-amateurs/
https://www.mongoosepress.com/catalog/excerpts/openings_amateurs.pdf
Some players may not like the idea of relying on the limited selection of an author. It is a pretty daunting project to try to learn a little bit about a lot of openings, but, if one wants more freedom to make choices, it would make sense to look at a book like Yasser Seirawan's Winning Chess Openings.
https://web.archive.org/web/20140627132508/http://www.chesscafe.com/text/hansen173.pdf
While reading such a book, don't forget that the primary purpose is to get help with making choices. Once one has chosen openings, I think that there is wide agreement that the way to start is by playing over sample games. Some of us think that it can be useful to use books like First Steps: 1 e4 e5 and First Steps: Queen's Gambit
https://www.newinchess.com/media/wysiwyg/product_pdf/7790.pdf
https://www.newinchess.com/media/wysiwyg/product_pdf/7652.pdf
as sources of games with explanations intended for those just starting to learn about an opening. Be sure to try to use the openings in games in between sessions of learning. Most of the time, one faces a position with no knowledge of a specific move indicated in a book. One has to accept that as part of chess, and think of opening knowledge as a sometimes helpful aid. After a game, it makes sense to try to look up the moves in a book and see if it has some indication of how one might have played better in the opening. Many opening books are part explanation and part reference material. The reference material is included in the text with the idea that one mostly skips it on a first reading, and looks at an individual item when it applies to a game that one has just played. Resist the temptation to try to turn a book into a mass memorization project. There are many important subjects that one should not neglect because of too much time on opening study.
https://www.chess.com/article/view/learning-an-opening-to-memorize-or-understand
https://www.chess.com/article/view/3-ways-to-learn-new-openings
https://www.chess.com/article/view/how-to-understand-openings
"... Overall, I would advise most players to stick to a fairly limited range of openings, and not to worry about learning too much by heart. ..." - FM Steve Giddins (2008)
"... I feel that the main reasons to buy an opening book are to give a good overview of the opening, and to explain general plans and ideas. ..." - GM John Nunn (2006)
"... If the book contains illustrative games, it is worth playing these over first ..." - GM John Nunn (2006)
"... the average player only needs to know a limited amount about the openings he plays. Providing he understands the main aims of the opening, a few typical plans and a handful of basic variations, that is enough. ..." - FM Steve Giddins (2008)
"... Everyman Chess has started a new series aimed at those who want to understand the basics of an opening, i.e., the not-yet-so-strong players. ... I imagine [there] will be a long series based on the premise of bringing the basic ideas of an opening to the reader through plenty of introductory text, game annotations, hints, plans and much more. ..." - FM Carsten Hansen (2002)
https://web.archive.org/web/20140627055734/http://www.chesscafe.com/text/hansen38.pdf
"The way I suggest you study this book is to play through the main games once, relatively quickly, and then start playing the variation in actual games. Playing an opening in real games is of vital importance - without this kind of live practice it is impossible to get a 'feel' for the kind of game it leads to. There is time enough later for involvement with the details, after playing your games it is good to look up the line." - GM Nigel Davies (2005)
"... Review each of your games, identifying opening (and other) mistakes with the goal of not repeatedly making the same mistake. ... It is especially critical not to continually fall into opening traps – or even lines that result in difficult positions ..." - NM Dan Heisman (2007)
https://web.archive.org/web/20140627062646/http://www.chesscafe.com/text/heisman81.pdf
Various items of possible interest:
"There is no such thing as a 'best opening.' Each player should choose an opening that attracts him. Some players are looking for a gambit as White, others for Black gambits. Many players that are starting out (or have bad memories) want to avoid mainstream systems, others want dynamic openings, and others want calm positional pathways. It’s all about personal taste and personal need.
For example, if you feel you’re poor at tactics you can choose a quiet positional opening (trying to hide from your weakness and just play chess), or seek more dynamic openings that engender lots of tactics and sacrifices (this might lead to more losses but, over time, will improve your tactical skills and make you stronger)." - IM Jeremy Silman (January 28, 2016)
https://www.chess.com/article/view/opening-questions-and-a-dream-mate
https://www.chess.com/article/view/picking-the-correct-opening-repertoire
http://chess-teacher.com/best-chess-openings/
https://www.chess.com/blog/TigerLilov/build-your-opening-repertoire
https://www.chess.com/blog/CraiggoryC/how-to-build-an-opening-repertoire
"... A typical way of choosing an opening repertoire is to copy the openings used by a player one admires. ... However, what is good at world-championship level is not always the best choice at lower levels of play, and it is often a good idea to choose a 'model' who is nearer your own playing strength. ..." - FM Steve Giddins (2008)
https://www.chess.com/article/view/the-perfect-opening-for-the-lazy-student
https://www.newinchess.com/media/wysiwyg/product_pdf/9035.pdf
https://web.archive.org/web/20140627110453/http://www.chesscafe.com/text/hansen169.pdf
https://www.newinchess.com/media/wysiwyg/product_pdf/9029.pdf
https://www.chess.com/article/view/has-the-king-s-indian-attack-been-forgotten
https://www.newinchess.com/media/wysiwyg/product_pdf/7277.pdf
https://web.archive.org/web/20140627104938/http://www.chesscafe.com/text/hansen159.pdf
https://web.archive.org/web/20140627052905/http://www.chesscafe.com/text/hansen175.pdf
https://web.archive.org/web/20140627022042/http://www.chesscafe.com/text/hansen153.pdf
"... Once you identify an opening you really like and wish to learn in more depth, then should you pick up a book on a particular opening or variation. Start with ones that explain the opening variations and are not just meant for advanced players. ..." - Dan Heisman (2001)
https://web.archive.org/web/20140626180930/http://www.chesscafe.com/text/heisman06.pdf
"... To begin with, only study the main lines ... you can easily fill in the unusual lines later. ..." - GM John Nunn (2006)
"... For inexperienced players, I think the model that bases opening discussions on more or less complete games that are fully annotated, though with a main focus on the opening and early middlegame, is the ideal. ..." - FM Carsten Hansen (2010)
"... I think people tend to be afraid of the main lines. They think: ... sure, I'm going to take up (say) 5 Bg5 against the Semi-Slav, once I've got time and learned it properly. ... My advice is - don't bother. The more you learn anyway, the more you'll recognize how little you know. ... 5 Bg5 is a good move - get it on the board, get ready to fight, and see what happens.
Sure, there will come a time, whether on move two or move twenty, when your knowledge of theory runs out and you have to decide what to do on your own. ... sometimes you will leave theory first, sometimes your opponent. Nothing will stop this happening. It happens in every well-contested GM game at some point, usually a very significant point. This is a part of the game: an important part, something you have to get better at. ... to improve you have to challenge yourself; ..." - IM John Cox (2006)
"... 'Journey to the Chess Kingdom' ... is primarily intended for children ... Chapter five deals with opening principles, while chapter six provides an overview of the most popular chess openings. Importantly, the emphasis is on giving insights and explaining ideas and principles as opposed to advocating mindless memorization of long lines. ..." - WGM Natalia Pogonina (2014)
https://www.chess.com/blog/Natalia_Pogonina/book-review-quotjourney-to-the-chess-kingdomquot

I picked my openings by playing through a collection of master games arranged by opening; I was looking for openings where I thought I'd enjoy the resulting middlegame positions. Having openings that suit your personality is important--it doesn't matter that the GMs love something, if the resulting middlegames make you miserable. I learned, for example, that I hate wide-open centers and should choose openings that keep the center closed.
I then stuck to these openings for a long time, which means I learned (by a combination of study and bitter experience) a lot of their typical traps and blunders. I think that, while some players do well learning a wide range of openings, for most of us it's better to pick a few and play them consistently. Different openings have different pitfalls, and trying to learn them all is infeasible.
I recommend playing over master games in your opening of choice. It's not enough to know that a move is good or bad (which an engine might be able to tell you): you need to know where it's going, and you get that from whole games. I like books that annotate the games very thoroughly, move by move--Neil McDonald has written some good ones.
Books dedicated to a specific opening are mostly useful later, once you have the basics and are trying to fix issues in your games. If you want to start with a book early, the "Getting Started" series lays out basic ideas in the opening for a range of different ones. I own their Dutch Defense book and it was quite helpful. Early in learning an opening, you don't want variations, you want ideas and typical plans. A massive technical book like Watson's _Play the French_ (which I also own) is just intimidating and unhelpful when you're starting out. (Actually it's always intimidating, though it has occasionally been helpful....)

Seirawan's opening book (Winning Chess Openings) is a good overview of different openings if you are trying to pick one, and also has useful general material about the goals of the opening phase. It's not detailed enough to use as a reference for a specific opening, though.
For more advanced players, _Chess Structures: A Grandmaster Guide_ by Mauricio Flores Rios is an amazing book with typical plans for both White and Black in a range of pawn structures. But this is less "how do I avoid blunders?" and more "I keep getting a bad position when White opens the c-file--what do I do?"
… For more advanced players, _Chess Structures: A Grandmaster Guide_ by Mauricio Flores Rios is an amazing book with typical plans for both White and Black in a range of pawn structures. But this is less "how do I avoid blunders?" and more "I keep getting a bad position when White opens the c-file--what do I do?"
"... Chess structures: A Grandmaster Guide is not a primer of positional play; for that, try Michael Stean's Simple Chess, Herman Grooten's Chess Strategy for Club Players, or Silman's ... How to Reassess Your Chess. Instead, you might think of Chess Structures as positional chess 'finishing school.' ..." - John Hartmann
https://chessbookreviews.wordpress.com/tag/chess-structures-a-grandmaster-guide/
https://www.newinchess.com/media/wysiwyg/product_pdf/7495.pdf
Suggest two books to study Openings in general.
Maybe:
First Steps: 1 e4 e5 and First Steps: Queen's Gambit
https://www.newinchess.com/media/wysiwyg/product_pdf/7790.pdf
https://www.newinchess.com/media/wysiwyg/product_pdf/7652.pdf

A paraphrase of something Seirawan said that really helped me (I am a verbal thinker and collect sayings like this):
Why are openings so different from the rest of the game? Because your pieces start out locked up and uncoordinated and it's a race to get them out there. In the course of that race you will probably have to put pieces on undefended squares, open lines leading to your king, and generally take risks you wouldn't want to take later on. That's why there are so many traps in the opening.
(One of my openings is 1. f4. I am painfully aware of this! One inattentive moment with 1. f4 (and 1. d4 f5 which I also play) and you lose material or your king on the open diagonal.)

Tricky endgames like N&P endgames, or converting a bishop pair advantage in an open position help me avoid a lot of blunders. Endgames in general help with square control, but I'm sure you already knew that
Here's a REALLY embarrassing example of me blundering a queen! Though in my defense it was 3 in the morning ...
It wasn't that long ago I saw 2700 blitz player Manudavid playing a great game against an IM and then he suddenly dropped a full rook! It happens to the best of us ;D

play e4-e5,
develop your minor pieces,
castle.
This is frequently written, but it's important to note that, outside controlled environments (such as clubs), there's 0 guarantees that your opponent will answer e2-e4 with e7-e5. And you answer to him playing c7-c5 or c7-c6 or e7-e6 will need to be different accordingly.
What are the easiest ways of avoiding blunders in the Opening phase of the game?