How do I pass parameters to a service?
Just add a new parameter in the constructor declaration, and get the service from $container.

public function __construct(QueryFactory $query_factory, EntityTypeManagerInterface $entity_type_manager, CustomServiceInterface custom_service) {
    $this-&gt;entity_query = $query_factory;
    $this-&gt;entity_type_manager = $entity_type_manager;
    $this-&gt;custom_service = $custom_service;
  }

public static function create(ContainerInterface $container) {
   return new static(
       $container-&gt;get('entity.query'),
       $container-&gt;get('entity_type.manager'),
       $container-&gt;get('custom.service')
    );
}


Notice that all the parameters the constructor gets are the ones passed in new static(). I removed $param1 and $param2, since there aren't equivalents in the static() call.

As for passing parameters to the custom.service service, you cannot with $container-&gt;get('custom.service') nor \Drupal::service('custom.service') since both the methods accepts only the service ID as parameter. The service needs a method to set its properties; in that case you could use the following code.

public function __construct(QueryFactory $query_factory, EntityTypeManagerInterface $entity_type_manager, CustomServiceInterface custom_service) {
    $this-&gt;entity_query = $query_factory;
    $this-&gt;entity_type_manager = $entity_type_manager;
    $this-&gt;custom_service = $custom_service;
    $custom_service-&gt;setParam1($param1);
    $custom_service-&gt;setParam2($param2);
  }

public static function create(ContainerInterface $container) {
   return new static(
       $container-&gt;get('entity.query'),
       $container-&gt;get('entity_type.manager'),
       $container-&gt;get('custom.service')
    );
}


You could also use the following code.

public function __construct(QueryFactory $query_factory, EntityTypeManagerInterface $entity_type_manager, CustomServiceInterface custom_service, $param1, $param2) {
    $this-&gt;entity_query = $query_factory;
    $this-&gt;entity_type_manager = $entity_type_manager;
    $this-&gt;custom_service = $custom_service;
    $custom_service-&gt;setParam1($param1);
    $custom_service-&gt;setParam2($param2);
  }

public static function create(ContainerInterface $container) {
   return new static(
       $container-&gt;get('entity.query'),
       $container-&gt;get('entity_type.manager'),
       $container-&gt;get('custom.service'),
       'param1 value',
       'param2 value',
    );
}