Portugal pressed in search of a second equaliser but Bernardo Silva missed their best chance to level, screwing off-target when faced with an open goal after Fernando Muslera dropped a cross into his path.
Ronaldo, now 33 and still playing some of the best soccer of his life, failed to provide the spark Portugal needed against Uruguay.
Portugal had no Plan B to fall back on to answer Cavani's masterful strikes on either side of Pepe's headed goal in the 55th minute.
Uruguay's previous five goals at Russian Federation 2018 all came from set-pieces but they opened the scoring in the seventh minute with a goal of the highest quality.
The proven marksman Ronaldo was understandably given no space by Uruguay's defence, and he hardly got a touch in the opposition box in the first half. In the single game against Portugal they saw five more.
"About Mbappe, everybody knows he's a really good player, he's like (Thierry) Henry a few years ago", Uruguay's own hotshot Luis Suarez told reporters after training on Tuesday.
There is no doubt that the World Cup here has lost a bit of sheen after the exit of the two mega stars, but the show must go on because the trophy on July 15 will be given to the best team, not to the best player.
For the player of real Madrid FIFA world Cup in Russian Federation became the fourth in his career, he participated in the world Championships 2006, 2010 and 2014. With his 85th worldwide goal, he surpassed the mark held by Hungary legend Ferenc Puskas.
Ronaldo had a brilliant shuffle on the right, and then Joao Mario crossed to Bernardo Silva.
It set up a knockout stage meeting with two-time champions Uruguay, who topped Group A with maximum points ahead of hosts Russia, Saudi Arabia and Egypt.
BBC pundit Alan Shearer described the decision to award Iran's late penalty as "shambolic". "In the World Cup, it is a different mentality", he said.
Rumours had it that Cristiano Ronaldo, a Portugal national will be retiring from worldwide football after a shocking exit from the World Cup 2018 in Russian Federation following their 2-0 defeat to Uruguay. Uruguay won all three of their group matches, and are the only team yet to concede a goal at the tournament. A World Cup title is the only thing missing from his collection of accolade.
"In a World Cup you have the top-level players", said Mbappe, who plays for Paris Saint-Germain. "He gives us confidence that we can win every match. We are just blessed to have him".