Cersei is trying to convince herself that Sansa is stupid, because that means Sansa isn’t a threat, as per the “younger and more beautiful” queen that will supplant her.
After Joffrey’s murder, she shifts from denial to seeing Sansa as the threat from the prophecy (although she’ll later shift to see Margaery as that figure).