You should never get that after a few seconds. Can you reproduce that? If so, post the URL here.
They always say that and it rarely is true . As I said, it might be that they delay the response when the request comes from Cloudflare.
If you can’t reproduce it, it is difficult to track but a 524 only occurs when your server takes longer than 100 seconds.
I am afraid that will be some issue on your host’s side and only they can fix that.