Need help with connection timed out 522 on Pi web server

If you need it https://support.cloudflare.com/hc/en-us/articles/200171906-Error-522 that’s the link to the 5xx (522) error troubleshooting, you can also use it to troubleshoot other 5xx errors (like the 502 error)