Trying to add video via URL. Getting 524 error code

That just means it took too long to import that video. > 100 seconds.

The 524 link in your post describes the issue, plus an option or two on how to fix it.

One option not mentioned is just for you: Use your computer’s local Hosts file to point to your server IP address, so you, as an admin, will connect directly to your server, rather than through the Cloudflare proxy.