How to learn openings?


Chess Openings Resources for Beginners and Beyond...
https://www.chess.com/blog/RussBell/openings-resources-for-beginners-and-beyond

As a beginner, you need opening principles. Exact opening lines is not the best way to improve because your opponents will play something non standard. Here is what you need to know for starters:
https://www.chess.com/blog/nklristic/surviving-the-opening-first-steps-to-chess-improvement

Hi! My name is Lauren Goodkind and I’m a chess coach based in California. I would encourage you to experiment with different openings and then decide if you like the opening or not. Many beginners start with the e4/ e5 opening. This results in openings such as the Spanish Game, Russian Game, Italian Game, and more. Then focus on getting the knights and bishops out toward the center.
A good way to explore openings is https://www.chessgames.com. Just select what opening you want to learn, and then push the "Find Chess Games" button.
I also offer a free beginner’s free eBook on my website, www.ChessByLauren.com in case you are interested.
Before each move, I highly encourage you ask questions before every move such as, “If I move here, is it safe?”, “Can I safely capture a piece?”, and more.
Also consider all checks and captures on your side and also your opponent’s side.
Learn basic tactics such as the fork, discovered attack, pin, and more. I offer interactive puzzles on my website: https://www.chessbylauren.com/two-choice-puzzles.php
If you are serious about chess, I highly recommend you hiring a chess coach to help you.
I hope that this helps.