There are many reasons for McLaren's slump. The three things you need most to win in F1 are a great engine, a great driver, and a great aerodynamicist; over a decade McLaren successfully rid themselves of all three.
First, they had an allergic reaction to Adrian Newey designing winning cars for them. The outcomes were that in 2006 (a) McLaren lost Newey (b) Red Bull gained Newey and had the best car for a few years (c) McLaren redesigned their management structure to prevent any one individual becoming 'too important', but the upshot of the 'matrix management' was that no-one was responsible or empowered to do anything.
Not content with failing to retain the best aerodynamicist of his generation, they then in 2012 lost the best driver, too. Hamilton wasn't just the best driver, he's also the most marketable, so McLaren lost not only tenths but sponsorship millions, too. Just like with Newey, a company who better respected, empowered and made space for unique individuals would have been more likely to retain an exceptional performer.
In 2015 McLaren gave up the front-running Mercedes engine in favour of a brand new Honda, thus guaranteeing they would be a year behind on development, a significant handicap for the first few years of the new turbo-hybrid formula. See
https://the-race.com/formula-1/the-i...edes-f1-split/ for more. They'd thus managed to eliminate their three key advantages, while putting in place an organisational structure that wasn't fit for purpose.
Then they decided to abandon Honda... and go with Renault, a company with a consistent track record of mediocrity. Another bad call, not only did it cost them a lot of money but they swapped a rising star for one with less potential to improve.
Back in early 2013 McLaren came out with a completely new car. It was nothing like its race-winning predecessor, neither in form nor in results. On a previous incarnation of this forum I predicted three years of pain for McLaren - a year with a bad car, a year with an engine provider who wanted to minimise information sharing, and a year with a freshman powerplant against sophomore rivals. I was clearly over-optimistic in suggesting it would only be three years.
Another way of looking at is that Ron Dennis fell out with the best aerodynamicist, the best driver, the best engine supplier, his top financier, the guy who made up the rules of the game, and his own CEO. Eventually the list of people you've pissed off catches up with you.