Or you can take the real explanation:
The cumulative effect of the orbiting electron cloud has enough cumulative force to keep the protons close together within the nucleus. There are a few more reasons, but that’s the one with the biggest effect in this case.
Here’s an analogy. You’d think on a simple level that Palestinian forces and Israeli forces would repel each other to avoid conflict. But other forces keep them there in close contact.
This isn’t a perfect analogy. An observant person will see the misfire, but I’m focusing on forces present in a system which might override individual forces that would prevail if the individual was by itself, not in the system.
For the proton/electron thing:
An individual proton will repel from another individual proton. But should they find themselves in a balanced system, an atom, with something there to hold them together, that rule doesn’t apply.
An individual person who hates being near another individual person will usually do whatever he or she can do to stay away from that person. But if they have to take the same train to work, well, there you go. But they’ll still stay as far apart in the train as possible. That happens in the atom as well.