What is?
https://www.drupal.org/docs/drupal-apis/services-and-dependency-injecti…
Define new service to reuse your unique application logic.
Service is a PHP class with some code that provides a single specific functionality throughout the application. You can easily access each service and use its functionality wherever you need it.
How to use?