Have you had this setup for a long time? Then it might be time to delete some of the config files in both letsencrypt and nextcloud container. It will then be recreated, but using the latest one. There is a date at the top of the files and if you don't have any date, it's very old.
In letsencrypt it's these files:
default
nginx.conf
proxy.conf
ssl.conf
In Nextcloud:
default
Remember to back up the files first, but do not keep the backups in the same folder as the original file.
Do you use our reverse proxy config?