Files Access Control - Allow Acces to more than one group

I would like to deny access to all groups except of two.

Example:

File system tag -> is tagged with -> Group1 (restricted)
User group membership -> is not member of -> Group1 or Group2

How can I achieve this?

Best regards,

Jan