If you are trying to remove cash option at checkout you need to get the terms first before you check.
something like: $terms = get_the_terms( get_the_ID(), 'product_tag' );
Then you can run checks and if any match selected items in cart at checkout by product tag then hide your gateway.