Unfortunately Drupal rules module is not triggered on CiviCRM membership CRUD function and CiviRules does but doesn't provide option to perform any CMS changes like creating OG groups in your case. I would recommend to create an extension or drupal module and use CiviCRM post hook to create OG group.
eg:
function extensions_civicrm_post($op, $objectName, $objectId, &$objectRef) {
if ($objectName == 'Membership' && $op == 'create') {
try {
$orgName = civicrm_api3('Contact', 'getvalue', [
'return' => "organization_name",
'id' => 1,
'contact_type' => "Organization",
]);
}
catch (CiviCRM_API3_Exception $e) {
// Not a organization contact
return;
}
// get the user id who will controll this group either Employee of relationship?
$userId = 1;
//create OG
$node = new stdClass();
$node->type = "og_node"; // use the machine name of OG group node type
node_object_prepare($node);
$node->title = $orgName;
$node->language = LANGUAGE_NONE;
$node->uid = $userId;
$node->group_group[LANGUAGE_NONE][0]['value'] = TRUE;
node_save($node);
$roles = array_flip(og_roles('node', 'og_node', $node->nid));
og_role_grant('node', $node->nid, $user->uid, $roles[OG_ADMINISTRATOR_ROLE]);
$values = [
'entity_type' => 'user',
'entity' => $userId,
];
og_group('node', $node->nid, $values);
}
}
HTH
Pradeep