How can I create my own certificate for the backend as well?

After I request the certificate with certbot when from the browser I access https://www.example.com the main screen appears but when I go to log in this error appears:

Http failure response for http://y.y.y.y.:9090/bc-pr/authentication/login: 0 Unknown Error

Without the certificate, therefore before running the certbot, in http it did not give any errors.

At this link Using let's encrypt in the backend server - #3 by _az I read that to configure the certificate to the backend you need to add location /.well-known/ acme-challenge/ {, because certbot recognizes only for one certificate and here it is also necessary to assign the certificate to the backend in my case to proxy_pass http://x.x.x.x:9090/bc-pr;

So it's a certificate error i.e. configuring nginx for certbot and I don't know how to do it I tried with that link but it doesn't work.