Hi @Tanaka Kouki ,
Thank you for posting to Microsoft Community.
Based on your description, I understand there is an error when you connect to Exchange Online in PowerShell. For the error message, it could be related to certificates.
Make sure your root certificates are up to date from the trusted authorities. If you use a self-signed certificate or a certificate from an internal CA, you need to trust that CA. You can import the CA certificate into the trusted root certificate store.
Check proxy and firewall settings and ensure your firewall settings to allow connections from O365. For a list of IP addresses and URLs that are used by Exchange Online, see the Exchange Online section of Microsoft 365 URLs and IP addresses.
Also, please refer the -Credential part of Connect-ExchangeOnline (ExchangePowerShell) | Microsoft Learn to check the command.
If my answer is helpful to you, please mark it as the answer so that other users can refer to it. Thank you for your support and understanding.