Webmin+Nginx+letsencrypt issue

I am running Debian 12 and installed Webmin. I also run Nginx. When I try to use letsencrypt for Webmin’s SSL, it tells me no matching Vhost found even though I have it set up in nginx. I got a cert for the domain using Certbot but cannot for Webmin. I copied the domains cert over to Webmin but Webmin failed to start. How can I get the cert on Webmin?

SYSTEM INFORMATION
OS type and version Debian 12
Webmin version 2.101.
Nginx 1.22.1.