We construct a model where the Yukawa couplings of the Standard Model (SM) fermions arise from the breaking of a \(Z_2\) symmetry and through mixing with a fourth family of vector-like fermions. By adding a scalar leptoquark, which is an electroweak triplet and odd under the \(Z_2\) symmetry, we obtain an explanation for \(R_{K^{(*)}}\) that is linked to the origin of the Yukawa couplings. The coupling of SM fermions to the leptoquark is mediated by the fourth family fermions, and is predicted to be related to CKM entries and mass ratios of SM fermions.