There are good motivations to consider that the flavour structure could emerge during electroweak symmetry breaking, for example if the Froggatt-Nielsen field dynamics were linked to the Higgs field. Remarkably, the the nature of the electroweak phase transition is completely changed when the Standard Model Yukawas vary at the same time as the Higgs is acquiring its vacuum expectation value, starting from order one values in the symmetric phase to reach their present values at the end of the phase transition. The thermal contribution of the fermions creates a barrier between the symmetric and broken phase minima of the effective potential, leading to a first-order electroweak phase transition. Besides, in this framework, the CKM matrix is the unique and sufficient CP-violating source for baryogenesis. This offers new routes for generating the baryon asymmetry at the electroweak scale, strongly tied to flavour models.