Since "whitelist" is both an historic bad labelling of people with racist connotations, and ambiguous and imprecise from a technical standpoint, various settings and protected member variables related to the Drupal\Core\Template\TwigSandboxPolicy class (see core/lib/Drupal/Core/Template/TwigSandboxPolicy.php) have been renamed.
Renamed settings
There were a site-wide settings you could place in settings.php that let you define classes, methods and prefixes that Twig would allow. Check your settings.php, settings.local.php, etc to make sure if you are defining any of these settings that you update them to the new names:
twig_sandbox_whitelisted_classesis replaced withtwig_sandbox_allowed_classestwig_sandbox_whitelisted_methodsis replaced withtwig_sandbox_allowed_methodstwig_sandbox_whitelisted_prefixesis replaced withtwig_sandbox_allowed_prefixes
From 9.1.0 through the end of the Drupal 9 using the legacy names will continue to work, but will trigger a deprecation warning. Starting in Drupal 10.0.0, support for the old names will be completely removed.
Renamed protected member arrays
The Drupal\Core\Template\TwigSandboxPolicy class used to have protected array member variables called $whitelisted_methods, $whitelisted_prefixes and $whitelisted_classes. The member arrays have been renamed:
$whitelisted_methodsis replaced with$allowed_methods$whitelisted_prefixesis replaced with$allowed_prefixes$whitelisted_classesis replaced with$allowed_classes
Any site that has extended this class in custom code should make sure not to use the old names for these member variables.