Upgrade Devel module and disable Kint
Since Devel 4 you have to add Kint youself:
composer require drupal/devel kint-php/kint

You can read through this epic issue to learn more: Unknown &quot;kint&quot; function. in Twig\ExpressionParser.

Also important to read the release notes. On all 4.0.0+ releases the following is written. You have to do this before upgrading:

If you have Kint module enabled, please run these commands before
upgrading:

drush pm:uninstall kint or uninstall Kint using the Drupal UI
composer require kint-php/kint



To fix any Kint-missing-module-error, simply downgrade Devel composer require 'drupal/devel:^2.1', uninstall Kint drush pmu kint and then upgrade again composer require drupal/devel kint-php/kint.