How do I interact with Mautic from a custom module? I need to create a new contact in Mautic every time a new user joins my Drupal site.
Drupal.org has the following two modules:

https://www.drupal.org/project/mautic
https://www.drupal.org/project/mautic_api

I can't find documentation from any of these two modules on how to access the Mutic API from a custom Drupal module.
I believe, this could be done from inside a hook like this.
/**
 * Implements hook_ENTITY_TYPE_insert() for user entities.
 */
function custom_mautic_user_insert(Drupal\Core\Entity\EntityInterface $entity){

  // Some code here to access the Mautic API to create the new contact.

}

I have seen the code of https://www.drupal.org/project/commerce_mautic, which uses an event subscriber to do its work, but this seems very complex for such a simple task.
I think you're on the right track. Module https://www.drupal.org/project/mautic_api provides a wrapper around Mautic API - see https://git.drupalcode.org/project/mautic_api/-/blob/8.x-1.x/src/MauticApiService.php#L127
You can use it in you module code via \Drupal::service('mautic_api'). The hook you've mentioned looks correct to me.