I updated Debian Bullseye with Nextcloud 25 to Debian Bookworm with Nextcloud 26 without a foreign php source.
In Debian Bullseye wait for upgrade to Nextcloud 26 is shown in Nextcloud 25 GUI. Should already be the case. Then dist-upgrade to Debian Bookworm with e.g. PHP 8.2 . Delete all PHP 7.4. Then use the Nextcloud updater in Nextcloud 25 (works with PHP 8.2 for me)
sudo -u www-data php updater/updater phar