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. Review the suggestions in this Community Tip for troubleshooting ideas.
If you use Cloudflare Registrar, you can’t change the nameservers away.