All perfect praise be to Allah, the Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
The rule "certainty is not overruled by doubt" means that whoever is certain that he performed ablution, for example, and doubts whether he broke his ablution or not, then whether he predominantly thinks that he broke his ablution or the two probabilities are equal, he does not pay attention to this doubt. Even if he is 90% certain (that he broke his ablution), then this does not eliminate the (full) certainty that his ablution is still intact (as the basis is that he has ablution, since he is 100% certain that he performed ablution), as indicated by the quote of An-Nawawi that you mentioned. Doing this blocks the door before Waswaas (obsessive whispers) and prevents getting carried away with them, because getting carried away with them leads to great evil.
Allah knows best.