It seems that this is a compatibility issue. I briefly checked the Magento marketplace and found the Shop By Brand extension (I am not sure if you are using this particular one, I am just assuming you do), and in the compatibility section it mentions: 2.3, 2.2, 2.1 and NOT 2.4.
My intuition tells me that whichever extension you use in the 'shop by' suite, ...
The answer you linked to is correct, but you're looking in the wrong place.
You need to look in the theme folder, for example, if you are using Luma:
You should really be creating/editing this file in your local theme.