It is often said that Opening preparation is considered one of the most vital things a chess player needs to learn when they start getting better(above 2000 elo). Many chess players are known for their good opening preparation like Garry Kasparov, Fabiano Caruana, Anish Giri, Hikaru Nakamura, MVL, etc. Most GMs prepare a lot of openings with different lines, and variations for their classical tournaments. Still, many are not able to get a win and reach the top.
I have never heard anyone say that Magnus Carlsen is very good at opening preparation. He's often regarded as a great endgame player, having good intuition.
So, my question now follows: Is opening preparation really effective and contributes a lot to win at the very top level? Or being a good endgame player, in which good intuition is better? If yes, then why do most of the players spend time in preparation? If not, then why can't they win most of their games by outplaying their opponent?
To make it more clear and easy to understand: I want to know if preparation is worth it compared to the time many titled players put into it.