Wins, losses, and draws are scored the same way as in hockey ... 3 points for a win, 1 point for a draw, 0 points for a loss. Germany had the most points, US and Portugal tied on points so they counted goal differences. US had more goals, so they advanced with Germany.
It’s not rocket surgery.
Or brain science.
You are also conflating the NHL S-E-A-S-O-N with the World Cup F-I-N-A-L-S.
Talk to me about rocket surgery when your team wins a series but still goes home like Portugal did.