Generating a new certificate does not give me any error, everything is successful. However, I solved it by creating a CNAME with the WWW and an A with server IP and using the original NS of the DOMAIN provider.
This is the answer when I put the www
The connection is not private
Malicious users may attempt to steal information from www.example.com (e.g., passwords, messages, or credit cards). More information
NET::ERR_CERT_COMMON_NAME_INVALID