Head to head record doesn't count at these championships. It's points, goal difference, goals scored, then fair play record.
It does.
If two or more teams are equal on points on completion of the group matches, the following tie-breaking criteria will be applied:
1. Higher number of points obtained in the matches played between the teams in question;
2. Superior goal difference resulting from the matches played between the teams in question;
3. Higher number of goals scored in the matches played between the teams in question;
4. If, after having applied criteria 1 to 3, teams still have an equal ranking (e.g. if criteria 1 to 3 are applied to three teams that were level on points initially and these criteria separate one team from the other two who still have an equal ranking), criteria 1 to 3 are reapplied exclusively to the matches between the teams who are still level to determine their final rankings. If this procedure does not lead to a decision, criteria 5 to 9 apply;
5. Superior goal difference in all group matches;
6. Higher number of goals scored in all group matches;
7. If only two teams have the same number of points, and they are tied according to criteria 1–6 after having met in the last round of the group stage, their ranking is determined by a penalty shoot-out. (This criterion is not used if more than two teams have the same number of points.)
8. Fair play conduct (1 point for a single yellow card, 3 points for a red card as a consequence of two yellow cards, 3 points for a direct red card, 4 points for a yellow card followed by a direct red card);
9. Position in the UEFA national team coefficient ranking system.