Nagelsmann, whose sacking in March 2023 led to Tuchel's arrival, was tipped to return to Bayern, but has now extended his contract with Germany until 2026
Ronaldo scored from the spot in the 13th minute before a stunning Weston McKennie volley put the Italian champions two goals up seven minutes later.
The Portuguese got his second penalty when Clement Lenglet was penalised for handball seven minutes after the restart.
Both sides had already qualified for the knockout stages before kick-off. They end the group phase on 15 points each but Juve take first place by virtue of a superior head-to-head record.