Hi VJDhinesh,
Thanks for reaching out using Apple Support Communities. Here to help.
We understand you are having trouble enabling Sync Library on the Music app on your Mac, is that right?
We see you came from the related article, 'If you see an error when you update or restore your iPhone, iPad, or iPod.' What action precludes the error you are describing? Is it when turning on Sync Library?
An error regarding a secure connection would generally be network related. Is your Mac caught up on MacOS updates? Are you connected to a VPN? Have you tried a different network connection? Take a look at the below article if you need to check for updates on your Mac.
Update macOS on Mac
This next article will bring you through troubleshooting that may assist with the issue.
If you can't connect to the App Store, iTunes Store, or other Apple services
Hope this helps! Feel free to follow up with the result of these steps and we will continue to assist as needed. Take care for now.