Which of the following is better to master: The openings, middlegame or endgame? Also, which is worth mastering?
Thats an extremely opinionated question.
Example, I study end games more and generally ignore openings. Middle games to me is largely tactics driven. I find studying end games easier than openings which seems purely rote in learning. I know folks who can recite openings , love studying them and think studying openings is easy. They are horrible with end games and hate studying end games. Its far to subjective.
It's common sense. Is it easier to manage something with 32 moving parts, or 5?
Purdy said that it's relatively easy to play a fair opening (though impossible to play a perfect one), because one or two slips in the opening won't kill you, whereas one or two slips in the ending swing wins into draws, draws into losses.
Chess players do better to study the ending first. How can you play a middlegame unless you can judge the ending on the horizon? It's easier to learn with fewer pieces on the board, and the mistakes there are far more costly than at other times.