This problem was driving me crazy and the internet had all kinds of crazy suggestions: delete your browser, etc.
This post put me on the right track.
I have 3 email accounts all pop3 on comcast.
BUT: when I initially set them up 2 of the 3 accounts defaulted to imap and I didn't catch it right away. When I did, I went back and changed imap to pop3 and that's when the problem started. Sure enough, when I went in and tested the email settings on the 3 accounts (email account/change/test settings), the one that was pop3 initially worked perfectly, but both accounts that had originally been imap gave me the certificate error. Apparently the original imap certificate hung around somewhere in the bowels of Win11 or Office365.
The certificate showed the path as imap.email.comcast.net, which didn't correspond to my pop3 account and verifies my assumption about the certificate being residual from the original imap account.
This post recommends deleting the current Outlook profile and starting a new one with new account settings. I didn't want to do that as I thought it was overkill and as a rule I don't try to fix problems by deleting things although that is sometimes the solution. Anyway, I noticed in the email account settings there is an option to Repair the account. So I tried that (email account/repair). Both of the failing accounts repaired successfully and I no longer get the certificate error.
Worked for me - maybe it will work for you.
Cheers!