Basically, you can't.
Apparently, radiant missions are a bit buggy currently, at least in their frequency. certainly in their logic.
The best way I've found to delay them is to avoid Preston. Just don't talk to him. Eventually, the quest will resolve as if you did talk to him, but it will delay the next task.
I mean, I like having the radiant quests, but it's kinda hard to get anything done, such as actual storyline or faction quests, when yer constantly playing Whack-a-Mole(rat)
As for settlement defense, getting it to around double your food and water total seems to minimize the chance of a mission, but it will not stop them.
And never, ever listen to Freedom Radio, or visit the Castle if you haven't turned off the speakers, guaranteed mission right there.
I have an apparently never ending ghoul problem at Sanctuary Hills, the "ghouls" are based in Wicked Fleet. Past dozen or so times I've done the mission, there has been one ghoul stuck behind a crate; I shoot him in the head and mission is complete.
Pretty sure this ain't working as intended.