You can create brand-specific Categories and Channels for Community Topics, and keep all Topics on the specific brand that they are assigned to.
The first step is to ensure that you have your second brand created (read here) in User Interface > Brand > Setup and have the portal and Community enabled:
Once this has all been set up correctly you can either click on the manage button on the top right of the Community section (or head to User Interface > Community). Now the details can be entered, making sure to fill in options for Statuses, Channels, Categories and optionally Labels, making them all relevant to your brand.
Please make sure to select the correct Usergroups when creating the Community Channels, in order to give them access to Community.
After adding the options that will be available for your brands Community area, you can go to your brands portal to see that only the options you have added can be selected when adding a new Community Topic and that preexisting Community Topics are no longer shared between brands, all Community Topics will only show on its relevant brand: