How to display product with two condition, category and brand taxonomy

If I were you I would print_r($category) and make sure it is giving you ID’s and not slugs. Also, you are submitting $category to both product_cat and brands.

If your field type were slug instead of id, and terms were exactly the same in both product_cat and brands then this would work… though it doesn’t make sense in the grand scheme of things.

Your ID’s are going to be unique from each taxonomy so passing $category to both taxonomies will not work.

I hope this helped.