diff -Naur cookiebot.bak/cookiebot.module cookiebot/cookiebot.module
--- cookiebot.bak/cookiebot.module	2020-02-11 13:53:23.000000000 +0100
+++ cookiebot/cookiebot.module	2021-10-28 10:50:15.935716805 +0200
@@ -73,7 +73,7 @@
   if (!empty($config->get('exclude_paths'))) {
     // Check both the URL path and the URL alias against the list to exclude.
     $path = \Drupal::service('path.current')->getPath();
-    $url_alias_path = \Drupal::service('path.alias_manager')->getAliasByPath($path);
+    $url_alias_path = \Drupal::service('path_alias.manager')->getAliasByPath($path);
     $path_match = \Drupal::service('path.matcher')->matchPath($path, $config->get('exclude_paths'));
     $path_match_url_alias = \Drupal::service('path.matcher')->matchPath($url_alias_path, $config->get('exclude_paths'));
     $path_match = $path_match || $path_match_url_alias;
@@ -155,7 +155,7 @@

   $declaration_node_path = $config->get('cookiebot_show_declaration_node_path');
   $current_nid = \Drupal::routeMatch()->getRawParameter('node');
-  $current_alias = \Drupal::service('path.alias_manager')->getAliasByPath('/node/' . $current_nid);
+  $current_alias = \Drupal::service('path_alias.manager')->getAliasByPath('/node/' . $current_nid);

   // Print full cookies declaration from Cookiebot.
   if ($current_alias === $declaration_node_path) {
diff -Naur cookiebot.bak/src/Form/CookiebotForm.php cookiebot/src/Form/CookiebotForm.php
--- cookiebot.bak/src/Form/CookiebotForm.php	2020-02-11 13:53:23.000000000 +0100
+++ cookiebot/src/Form/CookiebotForm.php	2021-10-28 10:50:10.291668772 +0200
@@ -64,7 +64,7 @@
     return new static(
       $container->get('config.factory'),
       $container->get('entity_type.manager'),
-      $container->get('path.alias_manager'),
+      $container->get('path_alias.manager'),
       $container->get('cache_tags.invalidator')
     );
   }
