How to inject an object into a service?
For this my_module.services.yml file:
services:
  my_module.obj:
    class: Drupal\my_module\ClassA
    arguments: ['@http.client']

You can discard the create() method from your A class, because you declared it as a service for which the arguments get resolved by the services YAML file parameters ie. '@http_client':
class A implements AInterface {
  
  /**
   * @var \GuzzleHttp\ClientInterface
   */
  private $httpClient;
  
  /**
   * @param \GuzzleHttp\ClientInterface $http_client
   *   A Guzzle client object.
   */
  public function __construct(ClientInterface $http_client) {
    $this-&gt;httpClient = $http_client;
  }


argument 1 passed to Drupal\my_module\ClassB::__construct() must be an instance of Drupal\my_module\ClassA, string given

Fix this by correcting your B class create() method to pass your service A name being 'my_module.obj', which would then in turn correctly pass an instance to the constructor of class B:
class B implements ContainerInjectionInterface {
  
  /**
   * @var \Drupal\my_module\AInterface
   */
  private $a;

  /**
   * @var \Drupal\Core\Logger\LoggerChannelFactory
   */
  private $logger;

  /**
   * @param \Drupal\my_module\AInterface
   *   Your module A class.
   */
  public function __construct(AInterface $a, LoggerChannelFactory $logger, ConfigFactoryInterface $config) {
    $this-&gt;a = $a;
    $this-&gt;logger = $logger;
  }

  /**
   * {@inheritdoc}
   */
  public static function create(ContainerInterface $container) {
    return new static(
      $container-&gt;get('my_module.obj'),
      $container-&gt;get('logger.factory')-&gt;get('my_module'),
      $container-&gt;get('config.factory')
    );
  }