This is another case. The masses of the hadrons composed of light quarks are almost completely from confinement of QCD, and it's not really well understood since it's a non-perturbative property of QCD. It is, however, known to be correct from lattice-QCD calculations of the hadron spectrum which today agrees at the percent level with the measured hadron masses.
An intuitive picture is provided by the MIT bag model. There the idea is that the three quarks are confined in a "blob" (the "bag") with a size in the order of magnitude of the nucleon radius (which is roughly around 1 fm). In this model you can think of most of the mass of the nucleon as being provided by the kinetic energy of the 3 light quarks. Their mass is almost negligible.
On a more abstract effective-field-theory level you may say that there are at least two possible ways to generate mass: (a) the socalled trace anomaly and (b) the formation of a "quark condensate", i.e., ##\langle \bar{\psi} \psi \rangle \neq 0##.
One way to check this is provided by heavy-ion collisions, i.e., high-energy collisions of heavy nuclei, as is done at the Relativistic Heavy Ion Collider (RHIC) at the Brookhaven National Lab (BNL) and at the Large Hadron Collider (LHC) at CERN. There one expects that in the collision a fireball of hot and dense matter is formed, which in the beginning is so hot and dense that the relevant degrees of freedom are partons (i.e., quarks and gluons) rather than hadrons, forming what's called a quark-gluon plasma (QGP). This fireball rapidly expands and cools down. It's living only for a time of around 10 fm/c.
It's very hard to get information of the hot and dense partonic and hadronic state. All you can measure with the detectors is the final hadronic state, and from the patterns of all kinds of observables one has to calculate back to the source it may come from.
However, there's one particular "rare probe", which let's us look into the hot and dense medium, i.e., lepton-antilepton pairs (either elektron-positron pairs or muon-antimuon pairs), the socalled "dileptons". The dileptons are produced from vector-like excitations of the QGP and from vector mesons in the hot hadronic phase of the fireball evolution. Since the dileptons do not interact via the strong interaction they suffer practically no final-state interaction, so that its mass and momentum spectra provide a space-time weighted average over the "thermal evolution" of the hot and dense fireball. Particularly at low invariant dilepton masses, ##2 m_{\ell} \leq M_{\ell^+ \ell^-} \lesssim 1 \mathrm{GeV}## the main sources are in-medium ##q\bar{q}## annihilation of quarks in the partonic phase and in-medium decays of the light vector mesons ##\rho##, ##\omega##,and ##\phi##. Since hat high enough temperatures and densities the hadrons dissolve into partons, one expects drastic changes of these particles' mass spectra, which should be reflected in the dilepton-production rates and thus the dilepton-invariant-mass spectra. Indeed, that's what has been observed over the about last 20 years (beginning with experiments at the SPS at CERN and now also at RHIC and LHC, but also at lower collision energies as at the Heavy-Ion Research Center (GSI) here in Germany): Compared to a naive expectation from dilepton production in proton-proton collisions, just scaling up the cross section with the number of nucleon collisions within the heavy-ion collision, you get an enhancement of dileptons at invariant masses just below the ##\rho##-##\omega## masses (around 770 or 780 MeV, respectively) and a tremendous enhancement in the very-low-mass tails.
All this is well described by in-medium dilepton rates from effective hadronic field theory in the hadronic and in-medium ##q\bar{q}## annihilation rates from thermal QCD (including in-medium modifications of the quarks in the socalled Hard-Thermal-Loop expansion (HTL)), appropriately folded with a model for the hot and dense expanding and cooling fireball (ranging from simple fireball parametrizations over ideal and viscous relativistic hydrodynamics, and microscopic relativistic transport simulations and combinations thereof) for the time evolution of the sources. As turns out, the main medium effect on the vector mesons within these models is a tremendous broadening of the mass spectrum of the light vector mesons with quite small changes in their mass, merging smoothly into the ##q\bar{q}## annihilation rates from thermal QCD, implying the restoration of chiral symmetry (from lattice QCD at baryochemical potential ##\mu_B=0## this occurs as a cross-over at temperatures around 150-160 MeV).
From this one can conclude that the main mass-generation mechanism of hadrons is due to the trace anomaly, i.e., the anomalous breaking of scale invariance of QCD, and only a small part is provided by the quark condensate, which is the order parameter for chiral symmetry, i.e., it should melt around the cross-over temperature, and this is indeed seen in the lattice-QCD calculations. The same lattice calculations show that the gluon condensate (related with the contribution of the trace anomaly to the hadron masses) is pretty stable in this temperature region, melting at quite higher temperatures only.
For a recent review on dilepton (and photon) production in heavy-ion collisions, see
https://th.physik.uni-frankfurt.de/~hees/publ/habil.pdf