Try:
univention-app shell nextcloud sudo -u www-data /var/www/html/occ db:add-missing-indices
univention-app shell nextcloud sudo -u www-data /var/www/html/occ upgrade
univention-app shell nextcloud sudo -u www-data /var/www/html/occ maintenance:mode --off
The first instruction adds possible missing indices to the database.
The second does the app-upgrade
The third turns off the maintenance mode.
If I see it right, you only did the second step in your first posting using the browser.