Being effectively and justifiably afraid that you might sin now or soon comes down to this. You’d need to “worry about what you’re doing or are about to do, for fear that there be or come to be something in it that isn’t fitting for G-d’s honor” as Ramchal words it, and to step aside and desist.
When it comes to the past, though — when you might imagine that it wouldn’t do any good to “cry over spilled milk” as the expression goes — he suggests that you “always think about what you’ve already done, and fear and worry that some transgression might have unknowingly come your way” anyway. Because if you do ruminate about it and fear that you’d done wrong, then you can actively repent and undo your troubling past (and thus “pour back” that “milk”, for all intents and purposes).
The great and holy ones certainly feared that they might have sinned. Our sages pointed out (Horayot 12a) that it’s said at one point about the anointing oil that Moshe had used to anoint Aaron as High Priest that, “it shall not anoint human flesh” (Exodus 30:32). And yet “it was explicitly stated that Aaron was to be anointed with it!”, Ramchal pointed out. So, “Moses and Aaron were afraid that they’d misappropriated its use in some way”, and had thus sinned.
Yet even though a voice was heard to say that that the oil hadn’t been misappropriated, still and all, Aaron was worried. He thought that while “Moses may not have misappropriated (it), perhaps he had”. But another voice was heard to say that “just as Moses hadn’t misappropriated (it) you too haven’t.”
After Abraham came to the rescue of his nephew, Lot, who’d been abducted, “he was worried (in retrospect) and wondered if perhaps his actions hadn’t been completely meritorious”. He was afraid “that somehow, between all of the soldiers that he had killed, there might have been a righteous (i.e., innocent) or G-d-fearing man” killed too, aside from the wicked who deserved to be. But he was told, “Don’t be afraid, Abraham (no innocent people were killed)'” (Bereshit Rabbah 44:4).
But make no mistake about it, Ramchal concludes, “only Moses found it easy to obtain this sort of fear, thanks to his great clinging to G-d”. The rest of us would need to strive for many years for such a level of sensitivity. That being so, it’s nonetheless Ramchal’s point that, “every pious person (or every aspiring one) should try as hard as he can to attain to this.”