Copy the cert files in /var/snap/nextcloud/current/certs/custom/ and then
sudo nextcloud.enable-https custom -s cert.pem privkey.pem chain.pem"