Setting up sub-domains in Cloudflare
Usually, to create a sub-domain you just need to create a CNAME in the DNS records.
Cloudflare is different! Do not create a CNAME in the DNS records pointing to the desired page. Instead, under Compute > Workers & pages, select your project and go to the custom domain to create it there. It will not work otherwise!