Once the domain name is pointed at your NAS device, there are features in the Synology user interface to create a certificate.
I didn’t find the official Synology documentation with a quick web search, but I know I’ve seen these instructions there as well.