Follow this script for installing the LXC : https://community-scripts.org/scripts/cloudflare-ddns
Do the setup as you would normally, add your api-key, at least 1 domain and the questions after.
If everything went well, this file should be available /etc/systemd/system/cloudflare-ddns.service
Download the file from this gist with wget https://gist.githubusercontent.com/noahbleau/bfc19ed738829b2a55adbfd502266037/raw/edit-ddns-domains.sh or create the file with the name of your choice (ex.: edit-ddns-domains.sh) with nano or your favorite editor and add the following: