Figuring out the correct URL sounds more of a question for the Nextcloud community to be honest (or for the developer of the app inside Nextcloud you’re using). Afaik Nextcloud uses WebDAV which includes request methods not supported by n8n’s HTTP Request node (such as PROPFIND).
Other methods used by Nextcloud (such as the HTTP standard methods GET or POST) are supported and from playing around a bit URLs such as https://nextcloud.hostname.local/remote.php/dav/files/thomas/Media/Photos/Profile%20Pictures/cartoon_white_background_1024.png (where thomas is the username and /Media/Photos/Profile%20Pictures/cartoon_white_background_1024.png the path to a file) are working for me: