I’ve seen a lot of strong players say at lower levels all you need to do is get really good at tactics, but, I’ve also seen a lot of people say that you should study the endgame before the opening or middlegame. Which answer is true? I want to know which one to study more.
Look at your own games, check what caused you to get in bad positions or maybe even to lose, and work on that. It's not rocket science.
If you never get close to endgames, improving them is going to have marginal effect.
If you regularly get endgames but don't know what to do in them, you need to work on endgames.
If you fail to win because you didn't go to a better endgame when you could, you saw the option but wasn't sure about it -- you need to work on endgames.
If you don't find tactics, you can work on tactics.
If you miss extremely simple tactics that you would always find in puzzles (like keeping pieces hanging), your problem isn't tactics but rather things like focus, blunder checking, underestimating the opponent's chances and you need to work on those.
But it works better to look at your own games and see why you lost them than to listen to some strong player give his opinion on chess players as a whole.
First things first, I think it's critical to distinguish between "theoretical" and "practical" endgames. They are two different stages of the game that require different skills and knowledge to be played correctly.
At a beginner stage, if you're capable of delivering the basic mates, plus know the basics of king+pawn-vs-king and rook+pawn-vs-rook, that's probably more theoretical endgames than you'll need for a long time.
On the other hand, there's practical endgames (say, a bishop+5pawns vs knight+4pawns type of position). These often boil down to tactics and strategy. Depending on your actual level, the time control you play at, the openings you choose and many other factors, you will encounter yourself in this type of situation more or less often. These positions are a great bootcamp for some fundamental strategical concepts (like bad bishops, the seventh rank, weak pawns and so on).
But I still think tactics will be a more important skill in the sense that they come before everything else. In practice, it won't matter how good you are with your "technique" to win an equal-ish knight endgame if you end up missing a fork. Good tactics (and precise calculation) are a tool that allows you to achieve your strategical objectives in a chess game efficiently.
Here is a practical answer from a long-practicing youth trainer.
Of course you need all, as others already stated. The interesting question is: which order would I recommend.
For example, I often see that kids in other clubs are funnel-fed with opening theory. Big short time effect, but I clobbered more than one of these robots by my creative openings!
For advanced beginners (rules, elementary mates, minimum opening priciples known), I train tactics, endgame and minigames intermixed. Again tactics will have the highest short time boost. But endgames will train a certain "feeling" for the handling of a single piece. (Without a certain amount of chess intuition, you never get really good, and it must be trained early.) I will not specifically train, say, rook bridge or Philidor defense. This will come after training them to survive the middle game, and too many games are decided by lack of specific endgame knowledge.
Addendum: Tactics you can very easily study on you own. Using an engine sparsely you don't really need a trainer (if you know a bit of methodology). You can also do this with endgames but I say a trainer is beneficial here. (The difference is the "why": a tactical move is more or less self-explaining.)
Knowing vancura's defence, concept of corresponding squares ,Steinitz rule, Botvinnik's principle of Knight endgame, Bahr's rule, Two Knight checkmate with pawn on board etc etc and etc are in vain if you overlook a 3-4 move long tactical variation and lose the game.
In practical terms this loses can really hurt your enthusiasm to study chess more and in some cases even to continue playing.
Like some smart guy has once said "blunders are tactics that you didn't see", So I would say you keep on working on tactics until your game analysis graph don't have any sharp spikes.
Once the graphs are smooth (either you beat you opponent slowly and steadily because you knowledge and understanding of the game is better than him or he did the same to you), you can put more effort into studying positional ideas, endgame theory and working on skills like calculation, visualization, evaluation etc.
For Endgame I would also recommend to consider endgame specific tactics (like this in lichess) and Books I would suggest to start with "100 Endgames You Must Know" by Jesús de la Villa and then the legendary one - Dvoretsky's Endgame Manual (There is also a very good chessable course on this book by GM Erwin L'Ami)
It's really a bit of both but labeling it "tactics" or "endgames" is what can get confusing as they are a means to an end.
Both of these teach you patterns that you can re-use in your own games but an often neglected aspect of this training is how you deliberately exercise your visualization muscles (being able to see moves in your head up to several ply deep where the picture of the board is crystal clear as if it was set up in front of you).
While tactical puzzles train this skill with a very immediate return-on-investment, endgames (with far fewer pieces on the board) are surprisingly effective at putting your mind through a deeper visualization challenge without the luxury of ONLY looking at forcing (checks, captures, unstoppable threats) moves to limit the lines you need to look at.
King and multiple pawn endgames are very exacting in this respect. You are presented a situation where a key pawn move or king move can drastically change the result of the game and concrete calculation (which requires visualization) is absolutely required.
It's not either/or. Endgames (being positions with few pieces) tend to make both tactical ideas and strategic concepts easier to see and understand. So a proper study of endgames will of necessity include tactical ideas and motifs. The basic checkmates, for example, are all endgames.
You're building a palace of chess knowledge, brick by brick. By starting with simple positions, you create a foundation you can later build on. For example, Q versus R endgames are replete with double attacks -- forks, pins, and skewers. But they're easier to spot and understand when the Q and the R are the only pieces on the board.
Learning proceeds from simple to complex. It's easier to understand the capabilities of the Knight when it's your only piece, but once you do understand, you'll be able to use them in more complex positions.
I've always considered endgames are where you really start to understand chess, as opposed to simply shifting pieces hoping for a chance to do something. Think about it: what good is it to win a pawn or two with a brilliant tactical coup, if you lack the endgame skill to bring the point home?
Understand please, I'm not saying study endgames exclusively until you can play all of them as well as Yuri Averbakh. I'm saying study endgames until you can reliably bring home the point you earn in the Middlegame (or, just as importantly, prevent your opponent from bringing home the point they earned). Eventually you will start using the tactics you've learned in your endgame study to gain advantage (or win) in your middlegames.