How would cold neutrinos get trapped by stars?
It requires that they lose energy somehow (to drop hyperbolic orbits into periodic ones).
There are two basic mechanisms available: gravitational scattering and weak scattering. In both cases we expect the interaction to be elastic, but that doesn't mean the neutrino has as much kinetic energy in the star's frame afterward the interaction as before: it could donate some to the other participants. This effect is necessarily very, very slow.
For gravitational scattering think gravity boost, but in the energy losing direction rather then the energy gaining direction as we usually apply it to spacecraft.
For weak scattering the same basic idea applies, As long as the center of momentum is moving with the neutrino's initial direction in the frame of the star the neutrino will have less energy in the stellar frame after the interaction than before.
In either case the baryonic matter member of the scattering gains energy, but it can radiate that energy by mundane means which is something the neutrino couldn't do by themselves. So the neutrinos can cool by transferring energy to the baryonic matter which cools in the usual way. Needless to say the neutrinos cool more slowly than the ordinary matter as their coupling channel is very weak.
The big question is "Shouldn't the neutrino gain energy roughly as often as it loses it?", and I think the answer is yes. But that results in a distribution of energy gains and loses and we consider the differential fate of the two tails of that distribution. The ones that are pick up energy will leave the vicinity of the star, while some those that lose energy may be tipped from "barely hyperbolic" to "barely elliptical" or if already captured will become slightly more bound. As usual the system cools as much by ejecting it's most energetic members by donating energy to the baryonic component of the system to be radiated by electromagnetic means.
I thought about this a little more since I prompted your question and there are a couple of other complications worth noting. This may be more like a comment than an answer, but it's too long for a comment.
First, and directly addressing your question: the cosmic neutrino background is already present before the gravitational well of the star forms. If you accept the hypothesis of a gas of cold neutrinos in thermal equilibrium at 2 kelvin, with typical speeds of 100 km/s, those neutrinos permeate star-forming regions with low escape velocity. The dense regions around the stars develop without interacting with the neutrinos, and the neutrinos find themselves trapped.
For a classical analogy, imagine you are riding on rogue planet A, unattached to any star. Star B, gravitationally unbound from you, is approaching from the north, and star C, also gravitationally unbound, is approaching from the south. An interaction with either star alone would eject you on a hyperbolic orbit. However if B and C collide and merge in such a way their velocity relative to you is zero, you and your rogue planet find yourselves gravitationally bound to the new object without having interacted with it. This is essentially the scenario faced by cold neutrinos in star-forming regions.
However, this simple trapping doesn't give any enhancement of the relic neutrino density around stars compared to the background average. It just says that you'll keep the neutrinos that are nearby when the star is formed.
Second, there is scattering. There is gravitational scattering, charged-current scattering off of ordinary matter, and neutral-current scattering among the neutrinos. All of these are tiny, of course, but there are a lot of neutrinos involved (see also the next point). A scattering event between two neutrinos in a gravitational well can cause one to be ejected from the well and the other to become more tightly bound. This process can give you a gradual enhancement of the density of "trapped" neutrinos over time, though putting any quantitative expression on "gradual" is beyond the scope of this answer (and probably already in the literature).
Third, and most annoying: don't forget that neutrinos obey Fermi-Dirac statistics. White dwarfs are bigger than neutron stars with the same mass because electrons are less massive than neutrons, so the degenerate number density for electrons is lower. Cold neutrino matter becomes degenerate at surprisingly low densities (one estimate). Any proper discussion of bound CνB neutrinos has to take this into account.
As explained in this paper, the dominant effect is due to gravitational interactions, which can yield overdensities up to a factor of $10^3$ for neutrino masses of the order of 1 eV. The clustering of relic neutrinos can be modeled well using the collision free Boltzmann equation (Vlasov equation) where the densities evolve under the influence of the gravitational potential, which in turn satisfies the Poisson equation.
The coupled system of the Vlasov and Poison equations contains all the relevant physics of how neutrinos get trapped due to local overdensities getting enhanced. If you have $N$ gravitationally bound particles and another particle comes along, it can lose energy by interacting gravitationally with an overdensity due to a clustering of a subset of these $N$ particles and then get trapped within the gravitational potential of the larger set of $N$ particles.