About the error code 524

Regarding 524 error you are experiencing, may I sugget below articles:

https://support.cloudflare.com/hc/en-us/articles/115003011431-Troubleshooting-Cloudflare-5XX-errors#524error

Does it mean you are running WordPress?

https://wpengine.com/support/error/#524_-_Timeout_Between_Cloudflare_and_Origin

Your origin web server maybe overloaded, causing connections to fail - even due to Website traffic, if so?

There may also be a long-running process hogging up your website’s resources like PHP request doing some work, which could cause connections to timeout and fail.

Furthermore, there is a 100 seconds as a standard timeout at Cloudflare to keep connections from being stuck to complete the HTTP request(s).