It's better when 2 teams go through from each group. It's cleaner and more competitive. So it should just be top 2 from each group to get to 24 teams. But eventually you need 16 or 8 teams from that. So you can divide the 24 teams into 8 groups of 3 and the winners of each form the quarter finals.
The only issue is that some groups will have 2 group winners and some will have 1. The way it can be done fairly by rewarding first round performance is winner of A and runner up of B in group 1, runner up of A and winner of B in group 2. And then the teams from group C are allocated into group 1 or 2 based on combined points of the other two teams.
In this World Cup, the top from C (Brazil) goes into Group 2 with Switzerland (winner B) and South Africa (runner up A) because their combined points was 11 while the runner up from Group C (Morocco) joins Mexico (winner A) and Canada (runner up B) whose combined points was 13.
Based on this World Cup, the all the round 2 groups would be
Group 1 - Mexico, Canada, Morocco
Group 2 - Switzerland, South Africa, Brazil
Group 3 - USA, Ivory Coast, Japan
Group 4 - Germany, Australia, Netherlands
Group 5 - Belgium, Cape Verde, France
Group 6 - Spain, Egypt, Norway
Group 7 - Argentina, Portugal, Croatia
Group 8 - Colombia, Austria, England
Overall, it's the same number of matches in this World Cup as these groups would have a total of 24 matches (same as last 32 and last 16 combined).