Ronaldo is one of the best goal-scorers in history, but then again so is Messi. They both have some insane statistics and records that other modern players can't get even come close to. You might say one is slightly better than the other based on metrics like goal/game ratio, non-penalty goals, major tournament KO stage goals etc. but I think roughly speaking they're pretty evenly matched.
However on top of scoring goals, Messi is also one of history's greatest passers, dribblers, set-piece takers and all-round playmakers. I've seen him make defence-splitting passes, dribble past 6 or 7 players over half the length of the pitch, rack up a ton of assists and even make some amazing tackles in his own half. Messi has a much greater overall influence on the game and can very easily put in a man-of-the-match performance without scoring any goals. In all these other aspects I think Messi outperforms Ronaldo by quite a distance.
So my final choice would be Messi.