It is interesting how nowadays we so often hear that learning openings isn't important until you reach a level such as 1800.
When I learned chess back in the 1950ies, virtually all the chess books (and I read many at the time) stressed the importance of learning openings before anything else. Too, there never were words back then such as "book" and "lines".
If I was starting out today, I would learn several basic openings...not memorize all the lines...but learn the principles. And I wouldn't worry about memorizing all the names and the names of variations. I personally look at chess as a thinking man's game, not a memory work piece.
After I grasped the basic concepts of opening...controlling the center, building a defense, getting the Ns & Bs positioned, castling,etc. then I would start playing a lot of tactics. From there I would learn end games.
Though, these are my personal opinions. Others will say to forget openings and do mostly tactics. Or, to get good at end games before learning openings. This has always seemed screwy to me. Often there is no end game. If you screw up at the opening, it will foul up the midgame and maybe there won't even be an end game.
I will add one other thought... I just don't get it how some people get so carried away with learning openings that they memorize "book" all the way out to 10 or 20 moves but don't really comprehend the reasons for all those moves. I scratch my head when I hear this.
Just gotta say - I've heard on and on about how overrated openings are, and how anyone under 2000 or even 1800 shouldn't spend more than 10% of their time studying openings, but I gotta say - after taking this advice for quite awhile, I've just starting studying openings in earnest, and I'm finding it one of the highest-yielding things I've ever studied in chess.
I will add that I'd consider studying openings a lot more than memorizng the main line or 1-2 variations of some opening and calling it a day - I've been working around a sort of repertoire with focus on commonly played lines, and using books/resources that analyze games well into the endgame for many lines so it a lot of middlegame training as well.
I'd honestly wished I'd done this long, long time ago. In fact, I'd say this type of opening(+middlegame) study is valuable for beginners right from the get-go - rather than studying a lot of master games in positions that you rarely achieve in your openings (like studying Caro-Kann pawn formations when you're a open Sicilian black player) it's a lot more impactful when you deeply analyze some of the lines you play a lot (and lose a lot to.)
I've been particularly surprised with the few but significant number of very-difficult-to-find OTB moves there are in a lot of openings - if you haven't seen it before, you'll likely get nailed by it,even if you have great tactical acumen. (Some lines I was getting nailed by was the e3 Lasker trap in the Albin countergambit, and positional crushes in the Falkbeer Counter-gambit if you don't play a totally nonintuitive early Qe2!.)
I was also losing a lot more than I won in the Kings Gambit Accepted lines when facing the solid Fischer Defense but I just got grandmaster Shaw's KG book and have suddenly had a lot more success with the very strange early Nc3!? and g3!? as white against it. There is no way you'd find these moves intuitively over the board, and they're super hard to find even with a computer (which is prob why it's Shaw's main recommendation!)