Define your terms as hierarchical custom taxonomies, as child taxonomies from the corresponding parent taxonomy you want them to inherit from...? Like this you would only need to query for your parent tax, and simply echo out the respective child taxonomies, if required.
** UPDATE **
What you could also do is simply use the wp built-in function used to get all the terms which are associated to a given post, sth like:
// Get ID of currently iterated post
$id_of_iterated_product = get_the_ID();
// Retrieve associated brand terms
$brands = get_the_terms( $id_of_iterated_product, 'brand' );
// Check if there are brand terms associated to iterated post
if ( ! empty( $brands ) ) {
// If so, iterate through them and get the name of each
foreach( $brands as $brand_key => $brand_object ) {
$brand_name = $brand_object->name;
// Do whatever you want with it
}
}
Explained update simply: What you do is query all the terms of a given taxonomy, and use them to query posts having them. What you should do instead is simply query posts which have terms of the brand taxonomy associated to it, and while retrieving these posts (inside your wp_query loop), access the id of the currently queried post in the loop, and retrieve the brand
terms associated to it. Inside the query loop, it would look sth like this:
$product_query_args = array(
'post_type' => 'your_post_type',
'tax_query' => array(
array(
'taxonomy' => 'brand'
)
)
);
$product_request = new WP_Query( $product_query_args );
if ( $products_request->have_posts() ) {
while ( $products_request->have_posts() ) {
// Insert example code from above into here
}
}