Ronaldo is better than Messi in specific attacking areas such as headers, long-range shots (when he was younger), positioning in the penalty box and penalties.
Other than that, Messi gaps badly.
His influence on his team’s play is considerably greater, as he isn’t just a static target man in the penalty area or your average winger but arguably the best playmaker in history on top of (arguably) being the best goalscorer in history.