Beep boop, I’m a bot! I dug through the forum to get you started. I sometimes get things wrong though, so do with this what you will until a human has a look.
It’s a restriction on the hostname, not a DNS resolver problem. Cloudflare Workers is on our list of blocked services for outbound connections from free hosting.
Our article on outbound connections lists Cloudflare Workers next to Discord, Telegram and Google Apps Script. It says blocked services may not resolve at all, so you get cURL error 6: Could not resolve host. That matches your error. It also explains why www.cloudflare.com works and your workers.dev hostname doesn’t.
Here’s the article:
The article suggests upgrading to premium hosting if you need to reach these services, or using an alternative service.
Staff have also said this block is intentional and won’t be lifted. The reason is that Workers were mostly being used to get around the Telegram block and to send spam. Another user’s topic got the same answer: