A 521 error generally means Cloudflare tried to connect to your origin server, but the server refused the connection.
So, even if Cloudflare is working correctly, your hosting server might not be accepting its requests.
First, check whether your hosting server is online and whether your website loads when you temporarily bypass Cloudflare's proxy using the DNS-only setting (the grey cloud) for the relevant record.
If the website works without the proxy, the issue may involve firewall rules, server security settings or blocked Cloudflare IP addresses.
You should also verify that your DNS record points to the correct hosting server IP.
If you're using shared hosting, contact your hosting provider and ask them to check whether Cloudflare connections are being blocked by the server firewall.
I'd avoid changing multiple Cloudflare settings at once. Test one thing at a time so you can identify what's actually causing the problem.