Does this error have any impact on installation?

[ * ] Configuring SpamAssassin…
[ * ] Configuring fail2ban access monitor…
[ * ] Installing Roundcube…
[ * ] Configuring File Manager…
The “https://getcomposer.org/download/2.7.2/composer.phar.sig” file could not be downloaded: php_network_getaddresses: getaddrinfo for getcomposer.org failed: Temporary failure in name resolution
Failed to open stream: php_network_getaddresses: getaddrinfo for getcomposer.org failed: Temporary failure in name resolution
[ * ] Configuring PHP dependencies…
[ * ] Installing Rclone…

Currently in installation.

dns resolution doesnt work.

Does it affect installation?

as you see about your error message, yes. Your local dns isnt working, try an easy nslookup google.com

Can I modify it to the DNS address provided by Cloudflare?

Hello.
If you really don’t have any other solutions for the time being, I think you can give Cloudflare a try, but even if nothing goes wrong, I’d suggest you need a functioning Hestia.