this is due to the existence of other forces called the strong nuclear forces that overcomes the repulsion forces between the protons and keeps the nucleons holding to each other also there is a type of energy that is called the nuclear binding energy and this energy also works on binding the components of the nucleus together