Cloudflare acting up

Your screenshot is a wp-admin page. It’s also giving 502 errors for regular visitors?

Since you say it started when you created a subdomain that uses Cloudflare, I would guess that a firewall at your host started throttling access that comes through Cloudflare.

5xx errors are caused by your host not responding to Cloudflare. Ask your host to check firewall logs.

https://support.cloudflare.com/hc/en-us/articles/218378978-What-should-I-do-after-seeing-a-502-or-504-gateway-error-on-my-site-