I am receiving a 502 error page when I test my button on my facebook business page

May I ask what is your domain name?

Have you got any Firewall Rules active for your domain at Cloudflare Dashboard?
Have you checked if you block any Cloudflare connections to your origin host / server?
Like if you have some Firewall or?

May I ask are this 502 errors comming from origin host/server or Cloudflare?
What happens if you temporarly switch to :grey: cloud (DNS only) or Pause Cloudflare on your Site ?

As far as I use Cloudflare, if you get an error 502, it should be from your host/origin server as described at the article below.

May I ask if you have tried contacting your hosting provider? Maybe there is an issue on a gateway / line from them or a maintenance period.

Therefore, have you checked your access or error log at your origin host/server for any clue?

Can you post a screenshot showing this error?

Furthermore, regarding 502 error message, may I suggest below article: