Please add the element structure for the brand also. Assuming, all elements under Brand and categories are under different levels, the xpath you could use is:
//h5[text()='Categories']/../../digital-coupons-filter-by-types/div
It seems both are in the same level:
i tested below locator:
//li[preceding-sibling::*//div[text()='SHOP BY CATEGORY']/..][following-sibling::*//a[@data-menu-id="10"]/..]
and also:
//li[following-sibling::*//a[@data-menu-id="11"]/..]
For amazon uk:
https://www.amazon.co.uk/: click the handburger menu and try out your self

so in your case you could use:
//div[following-sibling::*//h5[text()='Brands']/..]