Nextcloud is a self-hosted cloud: files, calendar, contacts, and a pile of apps, under the AGPL. You run it on a server you control, or you rent one. There is no Google in the middle unless you put one there.
The files are not end-to-end encrypted by default. Whoever runs the server can read them. That is you, if you run it well, or the hosting company if you do not. The end-to-end encryption app exists and it is limited. Photo backup is clumsier than Immich or Ente. You own the updates. A Nextcloud with no backups is a disk waiting to die. Treat it as infrastructure, not as a magic private Dropbox.
Use it when you want the calendar and the files on a box you administer. nextcloud.com
Install Nextcloud with full-disk encryption on the server and a backup that is not the same disk. Turn on the end-to-end encryption app only for the folders that need it, and read the warning that those folders lose server features. Everyone else on that server can be given a share. Shares are how private clouds stop being private. If a friend hosts it for you, they are the administrator. Trust them, or run your own.