How do I add filter with woocommerce categories?

I was missing the condition for the array inside the tax_query array. It is important to have it regardless if you have one or more conditions.

  $term_search = get_queried_object()->slug;
                // WP_Query arguments
                $args = array(
                    'p'                      => 'product',
                    'post_type'              => array( 'product' ),
                    'order'                  => 'ASC',
                    'post_per_page' => 20,
                    'tax_query' => array(array(
                            'taxonomy' => 'product_cat',
                            'field'    => 'slug',
                            'terms' => $term_search, // (the name of what you want to filter by (latest or whatever))
                        'include_children' => true,
                        'operator' => 'IN'
                        )),
                );