Error initializing network controller: failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N DOCKER: iptables v1.8.4 (legacy): can’t initialize iptables table `nat’: Permission denied (you must be root)

Always use the official documentation

Use other sources only when the official instructions doesn’t work, for example when you want to install Docker on a system which is not supported.

The issue also could be caused by the fact that you want to run Docker inside an LXC container. I would at least use a virtual machine created by LXD, but LXC containers could work too. My point is that the best way to find the reason is trying to install the official way first, figuring out if that works and make changes only when you know which step worked and which isn’t.