Custom Taxonomy and tax_query Issue?

I think that the problem is right in your code, but it’s really easy to overlook. Let’s take a closer look at this part:

    <div class="col-md-4">
        <?php echo $category_name = $get_categories[$i]->name; ?>
    </div>
    <?php
    $args = array(
        'post_type' => 'team',
        'tax_query' => array(
            array(
                'taxonomy' => 'Team_Category', 
                'field' => 'slug', 'terms' => $category_name
            )
        )
    );

What exactly is going on in here? You get name of term and store it as $category_name ($category_name = $get_categories[$i]->name;).

Later, you use this value as a slug ('field' => 'slug', 'terms' => $category_name).

Slug and name are different things, so there is a really big probability that your Tax_Query won’t find anything (if name contains capital letter, space or any special character, slug will be different from name).

So it should work fine, if you’ll change it so it looks like this:

    <div class="col-md-4">
        <?php echo $get_categories[$i]->name; ?>
    </div>
    <?php
    $args = array(
        'post_type' => 'team',
        'tax_query' => array(
            array(
                'taxonomy' => 'Team_Category', 
                'field' => 'slug',
                'terms' => $get_categories[$i]->slug;
            )
        )
    );

    $query = new WP_Query($args);