It turns out that the rules of the World Cup and the Champions League seem to be that the points of the two teams are the same, and the total goal difference should be seen first. Now it's time to look at the winning relationship first and then the total goal difference.
This rule began in the European Cup in 2002, when Sweden and Denmark jointly killed Italy with this unreliable rule. It is precisely because of this rubbish rule that the two weakest teams in Group A of the European Cup appeared this year.
Your understanding is basically correct, but G is not quite right. If possible, there should be a penalty shootout. If it is impossible to have a penalty shootout, we will advance according to the rules of the tournament. For example, some events stipulate that everything remains the same, and the team with the first seed appears, or the team behind it appears. Or a world ranking. Or according to the national alphabet. It's possible. Of course, drawing lots is also possible.