This giving me error when I use the duplicator plugin

That means it’s taking longer than 100 seconds to complete the task.

For such administrative tasks, I recommend that users use a local hosts file on their computer with the server’s IP address so you’re connecting directly to the server instead of going through Cloudflare which will time out like this.