The correct way to describe how the nuclei of covalently bonded atoms help keep the bond together is:
Positive particles in the nucleus are attracted to shared electrons, so the atoms stay close together.
In covalent bonding, atoms share electrons to achieve a full outer electron shell, which provides stability. The positively charged protons in the nuclei of the atoms create an attractive force toward the negatively charged shared electrons, helping to hold the atoms together in the bond. This attraction is part of what makes covalent bonds strong.