In chapter 2 of Particle Physics Brick by Brick, Still describes the proton-proton chain which involves a proton changing to a neutron at 2 different stages, once through decay and once by electron capture.
In the first stages of the Proton-Proton chain, two protons collide one of which can decay into a neutron with the release of an antielectron and an electron neutrino, to create Deuterium.
Later in the chain, Berylium-7 changes a proton to a neutron with the release of an electron neutrino, but this time through the process of electron capture.
My question is why does the proton in Deuterium decay and the proton in Berryllium-7 doesn't?