I use Namecheap to register my domains, but any other service like GoDaddy or AWS Route 53 would work as well. Cloudflare brings the benefit of a global content delivery network, DDOS protection and SSL for free built in. You can get the same with AWS CloudFront and a free SSL certificate from Let's Encrypt - there are a ton of options out there.
After purchasing the domain on Namecheap, head over to Cloudflare and add it to your Cloudflare account (as a free website):
Add your Namecheap domain to cloudflare here:
These nameservers will need to be added to Namecheap:
To add the nameservers in Namecheap, head over to "manage domain" for the domain you want to add to Cloudflare. Under the section Nameservers, click the drop-down menu and pick "Custom DNS":
Copy and paste the values from Cloudflare above:
Once done, accept by clicking the green checkmark.
Go back to Cloudflare and proceed. It may take 48h to verify the new DNS settings, but I usually found it to take less than 30 mins. Just refresh the page and soon you should see "Great news! Cloudflare is now protecting your site".
Congrats, your Namecheap domain is now live in Cloudflare! From now on, you will be able to manage all DNS records for this domain there.