diff --git a/composer.json b/composer.json
index db50b6d..0a94801 100644
--- a/composer.json
+++ b/composer.json
@@ -13,6 +13,6 @@
         }
     ],
     "require": {
-        "drupal/core": "^10.3 || ^11"
+        "drupal/core": "^10.3 || ^11 || ^12"
     }
 }
diff --git a/remove_http_headers.info.yml b/remove_http_headers.info.yml
index 4eff7bc..e90f621 100644
--- a/remove_http_headers.info.yml
+++ b/remove_http_headers.info.yml
@@ -1,6 +1,6 @@
 name: Remove HTTP Headers
 type: module
 description: Removes configured HTTP Response headers.
-core_version_requirement: ^10.3 || ^11
+core_version_requirement: ^10.3 || ^11 || ^12
 package: Security
 configure: remove_http_headers.remove_http_headers_settings
diff --git a/remove_http_headers.module b/remove_http_headers.module
index 43bf4ca..921e8bc 100644
--- a/remove_http_headers.module
+++ b/remove_http_headers.module
@@ -5,6 +5,8 @@
  * Contains remove_http_headers module hooks.
  */
 
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\remove_http_headers\Hook\RemoveHttpHeadersHooks;
 use Drupal\Core\Routing\RouteMatchInterface;
 
 /**
@@ -34,9 +36,7 @@ function remove_http_headers_page_attachments_alter(array &$attachments): void {
 /**
  * Implements hook_help().
  */
+#[LegacyHook]
 function remove_http_headers_help(string $route_name, RouteMatchInterface $route_match) {
-  if ($route_name === 'help.page.remove_http_headers') {
-    $readme_content = file_get_contents(dirname(__FILE__) . '/README.md');
-    return '<pre>' . $readme_content . '</pre>';
-  }
+  return \Drupal::service(RemoveHttpHeadersHooks::class)->help($route_name, $route_match);
 }
diff --git a/remove_http_headers.services.yml b/remove_http_headers.services.yml
index 1f687d1..3809255 100644
--- a/remove_http_headers.services.yml
+++ b/remove_http_headers.services.yml
@@ -16,3 +16,7 @@ services:
     arguments: ['@remove_http_headers.config_manager']
     tags:
       - { name: http_middleware, priority: 1000, responder: true }
+
+  Drupal\remove_http_headers\Hook\RemoveHttpHeadersHooks:
+    class: Drupal\remove_http_headers\Hook\RemoveHttpHeadersHooks
+    autowire: true
diff --git a/src/Hook/RemoveHttpHeadersHooks.php b/src/Hook/RemoveHttpHeadersHooks.php
new file mode 100644
index 0000000..3f7a6de
--- /dev/null
+++ b/src/Hook/RemoveHttpHeadersHooks.php
@@ -0,0 +1,24 @@
+<?php
+
+namespace Drupal\remove_http_headers\Hook;
+
+use Drupal\Core\Routing\RouteMatchInterface;
+use Drupal\Core\Hook\Attribute\Hook;
+
+/**
+ * Hook implementations for remove_http_headers.
+ */
+class RemoveHttpHeadersHooks {
+
+  /**
+   * Implements hook_help().
+   */
+  #[Hook('help')]
+  public static function help(string $route_name, RouteMatchInterface $route_match) {
+    if ($route_name === 'help.page.remove_http_headers') {
+      $readme_content = file_get_contents(dirname(__FILE__) . '/README.md');
+      return '<pre>' . $readme_content . '</pre>';
+    }
+  }
+
+}
