This is a great question. The positive charge of each proton should push away other nearby protons. So a nucleus with more than one proton doesn't seem possible, at the surface level. However, there's the strong nuclear force that is tying together these protons along with neutrons to form nuclei. Of the four fundamental forces, this has the most strength, but the shortest amount of range. This means the protons and neutrons must be really close together for this force to be effective.