A 524 error means Cloudflare did not receive a response from your host/server and timed out.
Pause Cloudflare, or set the DNS record to DNS only, so that requests bypass Cloudflare and go direct to the host so you can see the problem. Fix it, then once working, you can re-enable Cloudflare.