First of all, go to DNS settings

DNS section in Cloudflare

add www CNAME to root domain (you can specify @ and it will be replaced by domain after save), red fields are important:

Add CNAME www in Clodflare

Of course, replace with your domain (this is an example).

Go to page rules:

Page Rules in Cloudflare

Create a new one:

Page rule

Again, replace with your domain.

Force always using HTTPS

Another handy setting that is obviously a must is forcing HTTPS everywhere

SSL/TLS setting in Cloudflare

Always use HTTPS:

HTTPS enforcement in Cloudflare