Error with generating Let's Encrypt certificate for www version of web using CNAME to non-www version

That should now work.

Read

Your domain uses ns.gransy.com, but that name server had a buggy configuration. Missing Glue records, instead something like a "name server loop".

So Unbound stopped, too much time to find ip addresses.

CNAME should now work, now it's enough time to check that.