Error when deleting file or folder

Do or did you have music app enabled?

If yes, it could have something to do with this bug: Can't delete folders while the app is enabled · Issue #1068 · owncloud/music · GitHub

There is already a fix merged for that: https://github.com/nextcloud/server/pull/38625

If you do not want to wait, read this: Error deleting folders (or moving folders) - #3 by paulijar