On a 2022 server, if you had a cert installed and it got revoked, -or you decided to revoke it, you will be unable to connect via RDP.
You then need to connect to your host by other means and run the following command to assign another certificate. The first line shows which cert you have available
Get-ChildItem Cert:\LocalMachine\My
wmic /namespace:\\root\cimv2\TerminalServices PATH Win32_TSGeneralSetting Set SSLCertificateSHA1Hash="THUMBPRINTOFYOURNEWCERTIFICATE"