I thought the OS check was dependent on a successful DNS lookup of the URL containing the supported OS list, maybe I'm remembering incorrectly.
In any case, you're not going to get far if the script can't resolve DNS lookups, which based on the "ping cloudflare.com" test, you're not doing successfully.
Quoting from Failure dns name resolution and unrecognized service dnsmasq, try the change below:
This will temporarily reset the nameserver on the Pi to bypass Pi-Hole DNS.
sudo nano /etc/resolv.conf
Edit the
nameserver
line tonameserver 9.9.9.9
or your preferred third party DNS service, save and exit
After that, try the ping cloudflare.com
again and see if it's resolving. If so, try the Pihole install script again and share the results.