diff --git a/entity_reference_quantity.module b/entity_reference_quantity.module
index f45077a..3d7b3bc 100644
--- a/entity_reference_quantity.module
+++ b/entity_reference_quantity.module
@@ -5,20 +5,14 @@
  * Contains entity_reference_quantity.module..
  */
 
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\entity_reference_quantity\Hook\EntityReferenceQuantityHooks;
 use Drupal\Core\Routing\RouteMatchInterface;
 
 /**
  * Implements hook_help().
  */
+#[LegacyHook]
 function entity_reference_quantity_help($route_name, RouteMatchInterface $route_match) {
-  switch ($route_name) {
-    // Main module help for the entity_reference_quantity module.
-    case 'help.page.entity_reference_quantity':
-      $output = '';
-      $output .= '<h3>' . t('About') . '</h3>';
-      $output .= '<p>' . t('Entity reference field with quantity') . '</p>';
-      return $output;
-
-    default:
-  }
+  return \Drupal::service(EntityReferenceQuantityHooks::class)->help($route_name, $route_match);
 }
diff --git a/entity_reference_quantity.services.yml b/entity_reference_quantity.services.yml
new file mode 100644
index 0000000..15385a6
--- /dev/null
+++ b/entity_reference_quantity.services.yml
@@ -0,0 +1,5 @@
+
+services:
+  Drupal\entity_reference_quantity\Hook\EntityReferenceQuantityHooks:
+    class: Drupal\entity_reference_quantity\Hook\EntityReferenceQuantityHooks
+    autowire: true
diff --git a/src/Hook/EntityReferenceQuantityHooks.php b/src/Hook/EntityReferenceQuantityHooks.php
new file mode 100644
index 0000000..d5b5ed9
--- /dev/null
+++ b/src/Hook/EntityReferenceQuantityHooks.php
@@ -0,0 +1,32 @@
+<?php
+
+namespace Drupal\entity_reference_quantity\Hook;
+
+use Drupal\Core\Routing\RouteMatchInterface;
+use Drupal\Core\Hook\Attribute\Hook;
+use Drupal\Core\StringTranslation\StringTranslationTrait;
+
+/**
+ * Hook implementations for entity_reference_quantity.
+ */
+class EntityReferenceQuantityHooks {
+  use StringTranslationTrait;
+
+  /**
+   * Implements hook_help().
+   */
+  #[Hook('help')]
+  public function help($route_name, RouteMatchInterface $route_match) {
+    switch ($route_name) {
+      // Main module help for the entity_reference_quantity module.
+      case 'help.page.entity_reference_quantity':
+        $output = '';
+        $output .= '<h3>' . $this->t('About') . '</h3>';
+        $output .= '<p>' . $this->t('Entity reference field with quantity') . '</p>';
+        return $output;
+
+      default:
+    }
+  }
+
+}
