Hey there
A 524 error indicates that Cloudflare made a successful TCP connection to the origin web server, but the origin did not reply with an HTTP response before the connection timed out. By default - this timeout is set to 100 Seconds on all plans - and if you require this to be increased, you will need to look into the Cloudflare Enterprise plan.
I recommend reviewing the suggestions in this Community Tip for troubleshooting ideas.
Community Tip - Fixing Error 524: A timeout occurred Tutorial