I am sorry to hear you are experiencing an error 500. Unfortunately, this error is coming from your origin host/server. You would have to troubleshoot this.
May I ask have you looked into your origin host/server access and error log files for any clue?
Does it work fine when you temporary “Pause Cloudflare” for your site?
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.