Internal Server Error The server was unable to complete your request. If this happens again, please send the technical details below to the server administrator. More details can be found in the server log

because the previous file was not encrypted.
so the file format is different, the solution is to disable encryption on nextcloud.

If you need to disable encryption, there’s only one way to do so. Before you do, make certain you have backups of all the files_encrypted files for all users and the system.

Here are the steps to disable encryption.

  1. Open a terminal.
  2. Change to the Nextcloud directory with the command cd /var/www/html/nextcloud
  3. Switch the Nextcloud maintenance mode to on with the command sudo -u www-data php occ maintenance:mode --on
  4. Disable encryption with the command sudo -u www-data php occ encryption:disable
  5. Turn off maintenance mode with the command sudo -u www-data php occ maintenance:mode --off

Source (outdated): How to enable server-side encryption in Nextcloud | TechRepublic

A post was split to a new topic: Internal server error after update of NCP