How to learn theory?
I definitely recommend playing mainline stuff in the beginning because it teaches you a lot about all aspects of the game and improves your understanding. Imo system based strategies limit your thinking during an actual game and make your mind really inflexible.
To answer the question of learning theory, I think looking at a lot of games and recognizing the ideas in the openings you want to learn is essential. Personally, I create a database just to remind myself if I forget about a certain line, but this is very secondary as up to 1500 level I would say that the theory doesn't matter all that much, strategy and tactics is key!
Hi. If your aim to try and improve your rating, the best way at your level to do that is to avoid making blunders, such as leaving pieces hanging or allowing forks. This will help you improve much more than learning theory- generally, in my experience, players only benefit from theory at above 2000 rating or so, because the games they play are close enough to make the small benefit of knowing a series of opening moves worth it.
If you want to learn to play a particular opening, you should first try to practise with it in some informal games, and gradually build up some experience that way. The chess.com Opening Explorer in 'Analysis' after a game is particularly useful, because it tells you the best and the most popular moves in any given opening position, which you can then analyse yourself using the computer.
I hope this helps and I hope you achieve your ambitions of learning openings and becoming a better player!