Group entitiy queries for a specific content type using Taxonomy Term
Ok well here we go if i understand you correct you want nodes linked by a entity reff field value:
in your example "field_group_sched" the see the below condition
but later you can just group stuff by anything you want 


   // this is the known term id. 
    $group_term_id = 1;
    // for Entity ref use field_name.target_id
    $query = \Drupal::entityQuery('node')
      ->condition('status', 1, '=')
      ->condition('type', 'schedule')
      ->condition('field_group_sched.target_id', $group_term_id, '=')
      ->sort('created');

    $entity_ids = $query->execute();
    if (count($entity_ids) != 0) {
      $entities = \Drupal::entityTypeManager()
        ->getStorage('node')
        ->loadMultiple($entity_ids);
      // dump($entities); // requires var dummper
      if (count($entities) != 0) {
        $group1 = [];
        $group2 = [];
        // then you can play with order or whatever you want here. 
        foreach ($entities as $node) {
          // These are the loaded nodes;
          $title = $node->getTitle();
          $field_name  = $node->field_schedule_name->value;
          // if the schedule_name is "beer" put in to group 1
          if ($field_name == 'beer') {
            $group1[] = $node;
          }
          else {
            $group2[]= $node;
          }
        }
        // SEND your Nodes to the template here. 
      }
    }