Hi @Kayron1212 ,
Indeed the code is not working since it is meant to be applied to Choices type columns and PRODUCTNUMBER is a text type.
I tried a similar workaround for Text type columns and unfortunately it does not work there because I get the same server error. This means it can be applied directly to galleries 2 and 3 only.
However, the good news is that you can use the combo boxes instead of the galleries to filter Gallery1.
Looking at the mock-up below, you'll have a total of 3 combo boxes (A, !A and B):

ComboBox A is used to filter Gallery2, but because of the abovementioned, the hidden ComboBox !A is needed which has the inverted selection of ComboBox A. The Items property of Gallery should look like:
Filter(PRODUCT_ATTRIBUTE_VALUE_NEWS, ATTRIBUTENAME in CB_!A.SelectedItems.Value)
Filter(PRODUCT_ATTRIBUTE_VALUE_NEWS, ATTRIBUTENAME in CB_!A.SelectedItems.Value)
ComboBox B is used to filter Gallery3. Since the requirement is to have the selection of the ComboBox included, nothing has to change there.
Both ComboBox !A and B can now be used to filter Gallery1 by setting its' Items property to:
Filter(
Products,
'Product Number' in Filter(
PRODUCT_ATTRIBUTE_VALUE_NEWS,
ATTRIBUTENAME in CB_!A.SelectedItems.Value ||
ATTRIBUTENAME in CB_B.SelectedItems.Value)
).PRODUCTNUMBER
)