Here is the example of one my clients issue. He enabled cloudflare for one of his site eg https://www.domain.com and same got applied for subdomain https://www.sub.domain.com. Here, main domain is accessible after enabling cloudflare but subdomain https://www.sub.domain.com showing ssl error. Tried flexible ssl option under cloudflare then both links got affected and started showing too many redirects error.
One thing, i wish to keep www based urls for both main and subdomain so help to fix the issue with base on this scenario