I'm getting this bad gateway error since yesterday evening what to do now? I've tried all methods

That means that Cloudflare firewall couldn’t make a connection to the OpenAI server behind it.

You can disable ipv6 and see what happens. That may improve geolocation and routing.