Fran the two importants bits are:
- It's a Cloudflare error page
- The error message Cloudflare reports while hitting your server is "A timeout occurred"
It seems like either there's a misconfiguration between Cloudflare and your server, or your server is really timing out when trying to load Flarum.
The server logs might contain more details. You could also try temporarily disabling Cloudflare to see if it changes anything.
Did the error happen before or after performing the Flarum installation ? If you never reached the Flarum install page, it seems unlikely the error is caused by Flarum.