TL;DR: They don't.
First, let's take a look at the individuals and groups throughout the Dragon Ball Universe that are capable of wreaking the levels of havok that you describe. I'll mostly be limiting this analysis to Universe 7 to start with.
1. The Gods
The Gods, consisting of the Angels, the Kais, and the Gods of Destruction, among a few others, are a powerful group of deities that preside over the 12 Universes and maintain balance. The Gods of Destruction are mostly responsible for - you guessed it - destruction, so they cannot be expected to help defend mortals from various threats. Similarly, the Angels are merely the attendants of these gods, and do not directly take almost any actions beyond what their respective god wishes of them. This dynamic can be clearly seen when Beerus refuses to take any action against Golden Freeza when he arrives on Earth, and when he does not attempt to stop Goku Black when he invades the present timeline.
On the other hand, the Kais are tasked with ensuring mortals are able to live in peace and advance themselves as much as possible. However, their approach to actually accomplishing this is quite hands off. They do not intervene in the affairs of mortals directly in the majority of cases, preferring to simply observe and allowing them to engage in as much destruction as they please. They did not make any effort whatsoever to stop Freeza and his family from dominating the universe. However, they do occasionally provide their help in cases of extreme universal peril, such as the first and second appearances of Majin Buu in Universe 7, or Zamasu's rampage in Universe 7/10 (though the Zamasu thing was sort of on them).
2. Namekians
Namekians, though a peaceful race, boast very powerful fighters capable of doing serious amounts of damage. Though most Namekians are not fighters, the Namekian warriors we see fight against Dodoria and Zarbon have a power level of roughly 3,000, according to the Dragon Ball Wiki. To get an idea of how powerful that is, the same wiki lists Master Roshi's highest power level at 180 - and he was able to destroy the moon with a Kamehameha. Despite this level of power, though, they are actually the only Namekians we see besides Nail (and Piccolo) that are able to put up any level of resistance against Freeza and his soldiers. Though there may have been other warriors that were killed offscreen, we can conclude that Namekian warriors of this caliber are actually quite rare. As we saw, they were clearly not enough to defend the planet.
3. The Freeza Force
The Freeza Force is undoubtedly the largest organized force of powerful beings that we encounter in Universe 7, in terms of sheer numbers. Though the average Freeza goon is not that powerful (we see Roshi defeating many at once during Resurrection F), they are still much stronger than the average mortal. As well, the Freeza Force has quite a large array of very powerful individuals, including:
- Cui
- Zarbon
- Dodoria
- The Ginyu Force
- Shisami
- Tagoma
And of course, Freeza himself.
The Freeza Force also has control of the entire Saiyan race, who are quite powerful on average, similar to Namekians. The difference, though, is that the Saiyans are a warrior race, so everyone was encouraged to grow as strong as possible. It is hard to know the average strength of a Saiyan - I do not believe it is ever stated - but even if the average Saiyan was only a tenth as strong as Raditz, a low class warrior with a power level of 1500, they would still be a very powerful force, especially with their Great Ape forms. Remember, Roshi destroyed the moon with a strength of 180. It's easy to see why Freeza destroyed them before they began to threaten him.
Finally, we have...
4. Earthlings
The Earthlings, otherwise known as the Z-Fighters, are the other notable group of beings in Universe 7. Assuming the farmer that encountered Raditz represents the average human, humans are not at all powerful with a power level of 5 according to the wiki. However, they have the potential to grow quite powerful as seen with Krillin, Tien, and Yamcha (don't laugh). The Earth has also produced other extremely powerful fighters, including Goku and Gohan, the Androids, and Cell, all of whom are astronomically powerful in the grand scheme of things. Consider that before Goku came around, there was no one powerful enough to challenge Freeza - even in his first form.
Get to the point already!
All this is to say that powerful, planet destroying beings are actually not that common. In the scale of the Universe, the fact that there are only around 4 major groups that deal with beings in that power scale tell us that this isn't something that most planets are likely to encounter on a regular basis. Indeed, the Galactic Patrol from Dragon Ball Super seems to be somewhat influential, with their Galactic King being invited to the Universe 7/Universe 6 tournament between the Gods of Destruction, and yet we know that one of their elite patrolmen, Jaco, is not powerful at all. Bulma threatened to send Vegeta to destroy Galactic Control headquarters, and Jaco was scared silly. The Galactic Patrol has no way to fight him.
Knowing this, it is safe to assume that for the most part, planets do not have any reliable way to defend themselves against extraordinarily powerful individuals. Planet Vegeta was wiped out by Freeza single-handedly, and the same would have happened to Namek if the Z-Fighters hadn't intervened.
Note that this does not necessarily apply to other Universes, though - Universe 11 has the Pride Troopers, who seem to patrol to random planets and stop threats, and Universe 6 has the Saiyans, who hire themselves out to protect other planets.
Update: The Galactic Patrol
As of the Dragon Ball Super Manga chapter 43, we can see that the Galactic Patrol has been around Universe 7 for at least 10 million years. As well, Merus, a member of the Galactic Patrol, was able to get the drop on Vegeta and stun him with a stun gun, by Vegeta's own admission. It may be that the Galactic Patrol does indeed have skilled members capable of holding their own against powerful beings, and Jaco is merely an incompetent outlier.
The Other Universes
To address the comments, I'll talk about how the other Universes deal with such threats in more detail, since the above answer pertains mostly to Universe 7.
Universe 1:
Not much is known about them, besides the fact that they have a very high mortal level, making them exempt from the Tournament of Power. It's hard to make any judgments here.
Universe 2:
We don't get to see their universe much, but it is seen in episode 91 that an audition is being held to determine who will fight in the Tournament of Power. This could mean that strong fighters are common here. As well, the fact that the Tournament is public knowledge (it is later seen being broadcast to all of Universe 2) could potentially imply that the gods of Universe 2 interact with mortals more regularly, which could extend to defense (though this is speculation).
Universe 3:
Universe 3 has Katopesla among their roster, who is apparently some sort of policeman in his Universe. Though he is likely the strongest of them, since he was selected for the Tournament, there may be more who, while weaker, have a high power level, and help defend the Universe from threats.
Universe 4:
Though they fight in the Tournament of Power, we don't know hardly anything about them. Considering how much of a jerk Quitela is, though, I doubt he takes the time to defend any planets (especially since he's a God of Destruction...).
Universe 5:
Like Universe 1, they didn't even enter the Tournament of Power, and we don't know much about their Universe at all.
Universe 6:
As briefly stated above, Universe 6 has the Saiyans, who hire themselves out to protect other planets. Frost also claimed to do a similar thing initially, though it was eventually revealed he was instigating the conflicts that he was resolving. Still, it shows there is at least some level of a formal defense organization in this Universe. It's unknown what the Namekians of this Universe do with their time (though they were all willing to fuse into Saonel and Pirina to ensure their survival).
Universe 7:
See my old answer.
Universe 8:
Same story as Universes 1 and 5: we don't know anything about this Universe.
Universe 9:
We do get a bit of insight into Universe 9. We know that this universe is extremely difficult to survive in, since it was described by the Trio De Dangers as a "garbage dump" (according to the wiki). Considering the utter chaos the universe seems to be in when Sidra destroys a city, we can probably assume there isn't much in the way of defense for most planets.
Universe 10:
Though there are several strong fighters in this Universe, like Obuni, we never get to see if there is any form of a defense force. It certainly won't come from the gods, considering Gowasu's policy of leaving mortals to develop, similar to Shin (this was also one of the reasons Zamasu betrayed Gowasu).
Universe 11:
As mentioned briefly in my old answer, Universe 11 has the Pride troopers, who actively patrol the Universe and destroy threats, as seen here.
Universe 12:
Like Universes 1, 5, and 8, this Universe was exempt from the Tournament of Power, so we didn't learn much about them.
Summary
Overall, while it seems that some Universes have some level of defense for all planets, many of them do not, and would have to rely on powerful altruistic individuals to protect them from evil or destructive forces.