Hello, first of all, thank you for the help that was very helpful to me.
I managed to synchronize google drive-ubuntu server and nextcloud. I can create, delete and modify files and folders.
The error I had regarding permissions was that I had to create a folder outside the root of /var and before mounting rclone I had to give it www-data permissions and in nextcloud assign it as local external storage.