Understanding the production mechanism of light (anti)nuclei is one of the key challenges of nuclear physics and has important consequences for astrophysics, since it provides an input for indirect dark-matter searches in space. In this paper, the latest results about the production of light (anti)nuclei in pp collisions at \s $= 13$~TeV are presented, focusing on the comparison with the predictions of coalescence and thermal models. For the first time, the coalescence parameters $B_2$ for deuterons and $B_3$ for helions are compared with parameter-free theoretical predictions that are directly constrained by the femtoscopic measurement of the source radius in the same event class. A fair description of the data with a Gaussian wave function is observed for both deuteron and helion, supporting the coalescence mechanism for the production of light (anti)nuclei in pp collisions. This method paves the way for future investigations of the internal structure of more complex nuclear clusters, including the hypertriton.