What are the correct DNS settings for cloudflare pages including www?

My domain is registered through Cloudflare and my site is using Pages. I want the apex domain to always show WWW and it’s not clear to me how to do this when the main apex domain was automatically set up as a CNAME of/to the default .pages.dev URL

Here is my current (incorrect) configuration:

[deleted the photo for privacy/security reasons]

This is wrong because when I enter the www URL it gives the Cloudflare error page "Origin is unreachable”

What is the correct configuration? The guides I could find didn’t really seem to apply to sites hosted on default .pages.dev using a CNAME record. Should I change this to an A record somehow?

(also, I read elswhere that using a CNAME could cause problems when setting up MX records, is this true?)

Thanks for the help

Can anyone help with this?

The apex domain will never show www as www is a subdomain of your domain.

I think you have the order of the DNS records the wrong way round. You want to CNAME the www to pages with a custom domain in pages. You can then use a redirect to make it so anything who visits your apex domain is redirected to www.