Regarding Cloudflare 524 and 525 error, may I suggest you to take a look into the below articles for suggestions and troubleshooting the issue:
Before moving to Cloudflare, was your Website working over HTTPS connection?
May I ask what SSL option have you got selected under the SSL/TLS tab at Cloudflare dashboard for your domain ( Flexible, Full, Full Strict … )?
Kindly, before doing anything at Cloudfalre SSL/TLS settings, you could determine if you have a valid SSL certificate installed at the origin host/server from the new web hosting provider by following the steps from below:
Use the “Pause Cloudflare on Site” option from the Overview tab for your domain at dash.cloudflare.com .
The link is in the lower right corner of that page.
Give it five minutes to take effect, then make sure site is working as expected with HTTPS.
Check with your hosting provider / cPanel AutoSSL / ACME.sh / Certbot / Let’s Encrypt or some other and renew it accordingly.
Only then should you un-pause Cloudflare and double-check your SSL/TLS setting to make sure it’s Full (Strict).
Here is a way to re-check if you correctly setup the SSL for your domain with Cloudflare:
In case you do not have an SSL certificate, you can use Cloudflare SSL, if so, kindly make sure you follow the instructions as follows on the below article to setup an SSL certificate using Cloudflare Origin CA Certificate: