Can't make certs with certbot on Debian 11

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. |, so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command:certbot

It produced this output:An unexpected error occurred:
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='', port=443): Max retries exceeded with url: /directory (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f57e892b850>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

My web server is (include version): apache 2.4.54

The operating system my web server runs on is (include version): Debian 11

My hosting provider, if applicable, is: local

I can login to a root shell on my machine (yes or no, or I don't know): yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): webmin is running.

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):certbot 1.12.0

Please fix the DNS resolving capabilities of the host which is used for Certbot and try again.