There is no debate between Messi and Ronaldo.
Messi was obviously the better dribbler, both at peak level(2007-2012 Messi was probably a top 5-10 dribbler ever) and of course during their whole careers (Ronaldo was a decent dribbler until around 2013-2014, though never close to Messi, then fell massively).
Messi is obviously the far better creator, holding many assist-records and being crowned the best playmaker in the world 3 times iirc. Ronaldo was nowhere close to that level, while Leo was compared to contemporaries like Xavi and KdB.
They were both fantastic scorers, each at their own right. CR7 was a beast until ~2014, having a varied arsenal, including long shots, free kicks and some solo goals. After that, he became more of a poacher, still with great numbers though. Messi has had arguably an even greater arsenal of goalscoring skills, including some of the best solo goals ever and later into his career he became the most lethal shooter outside of the box in the world. So, while it is arguable, Messi scored the most beautiful goals between the two. Even when you just look at numbers, Leo had 6 golden Boots to Ronaldo‘s 4 and Leo has also had the most prolific single season/ year (2011/12 and 2012 respectively).
Messi has also received more and more prestigious titles. CR has the edge on CLs (5 to 4 or basically 3, more on that later), but Leo has the WC. Plus, during their common time in Spain, Leo won 6 La Ligas to CR‘s 2.
Messi has had arguably the better prime, no matter if you count a single season or a 3- or 5-year span. For example, 2010/11 Messi is better than any CR season, 2009-2012 Messi is better than any CR 3-year span and 2010-2015 Messi is also better than any CR 5-year span etc.
The only argument that CR kinda has/had, is that he was more valuable in the biggest moments, though it has been kinda shattered lately.
-Leo had 1 fantastic WC run (2022) and one quite decent one (2014), while Ronaldo infamously failed every single time in the WC KOs.
-Leo has had multiple pretty good to great Copa runs, including the 2021 one. He was unlucky to have won only one, imagine if his teammates bailed him like Portugal in 2016. CR had a decent tournament but did not even play in the final that is.
-Finally, CR has admittedly more success in the CL, having won 5 to Leo‘s 4 (basically 3 as the main man). CR is also admittedly the far better CL KO scorer, which was heightened by the fact that Leo went missing in the CL KOs in 2014, 2016, 2017 and 2018 (I am counting their prime years). However, while Ronaldo has had the better scoring seasons and maybe more iconic moments, if you look closely, another image appears: while both had great teammates, it could be argued that CR received more help.
Basically during his prime, when Messi went missing/ was ineffective in the CL KOs, then Barca was lost. There are countless examples, like 2010 Inter, 2012 Chelsea, 2018 Roma, 2014+ 2016 Atletico, 2017 Juventus etc. Even when sometimes Leo was great, Barca still lost (2019 Liverpool comes to mind). The only times Barca went through, despite Messi not being in great form are probably 2009 Chelsea and 2017 PSG.
On the other hand, while CR has had some fantastic and clutch CL runs (I repeat that to be clear), he arguably received more help from his teammates in the most crucial moments:
-2014 vs. Atleti: if Ramos had not scored that header, CR would be labeled as the choker who failed to score in the final (despite one of his best CL runs)
-2016: he did not score or assist in the Semis vs City and in the final vs. Atleti iirc
-2018: same story in the semis vs. Bayern and in the final vs. Liverpool iirc
And maybe there are more examples.
So, yeah overall, no debate, like Carragher recently said, there has never been a debate