Gpg: no valid OpenPGP data found. and while updating Failed to fetch https://brave-browser-apt-release.s3.brave.com/dists/stable/InRelease Temporary failure resolving 'brave-browser-apt-release.s3.brave.com'

While installing, I get the error gpg: no valid OpenPGP data found. on executing curl -s https://brave-browser-apt-release.s3.brave.com/brave-core.asc | sudo apt-key --keyring /etc/apt/trusted.gpg.d/brave-browser-release.gpg add -

And after reading the discussions I tried curl https://brave-browser-apt-release.s3.brave.com/brave-core.asc and got curl: (6) Could not resolve host: brave-browser-apt-release.s3.brave.com

I am able to install the browser, but I cannot update it.
How can this be resolved?