Unfortunately Nextcloud does not always play well with SFTP, you can read more about that here:
https://help.nextcloud.com/t/get-files-from-the-sftp-server/59211/16
The recommended setup for Nextcloud is to use WebDAV which is built into iOS Strongbox and works very well according to most reports.