It can be done a couple of ways and is fairly easy. The problems come up when there are people common to both sides of the family. Your cousin marrying your husband’s cousin. The brother of your great-grandmother marrying the sister of you husbands great-grandmother. This can lead to them and their descendants being common to both tress. Every time you add someone to one tree you have to check the other tree to see if they have a connection over there. If this later becomes an issue you can run into serious problems trying to put the trees back together. Merging trees is a lot harder and more error prone then splitting trees.
My recommendation is to leave everybody in one tree. If, at some point you have a need to split of part of your tree to share it, it is easy to do.