It would depend on the circumstances. You'd have to be there to know what to do. I don't know what you did, and I don't know if you're second guessing yourself, but it is a lot easier to look at a situation in hindsight when you have plenty of time to think than it is to react when you only have a moment. Whatever you did, you likely did the best you could with the time you had to comprehend what was going on and what little training you may or may not have had regarding such situations. Maybe you'll handle it differently next time after whatever happened this time, but I bet you did what you thought was right at the time.
Is the man physically assaulting the woman in a way that you fear for her safety? Is it a brutal beating or did the man slap her and push her back? If I felt she was in danger, I would consider intervention. Otherwise, if you get involved in a domestic violence situation you might escalate things and cause yourself to get in physical danger and legal jeopardy, and you might be best off calling the police if things look to be going bad. If it's mild abuse and you intervene, when the cops get there she might turn around and side with him and even lie about what happened even though you were just trying to help her.
If it was a serious situation where I feared injury or death for the woman, I would tell him to stop on approach and if I thought I was strong enough I would first attempt to use non-lethal force to protect her, but I'm not getting myself killed to save someone and I would want to be sure I was acting on solid legal ground too. I personally weigh 120lbs and I am 5'7". If I saw a 200 lb 6'3" strong man savagely beating a woman I'd probably throw something, or employ some sort of weapon and maybe even draw my gun if I felt that was the only way to stop the woman from being seriously injured or killed. If I had the means to do so and the advantage of being in a situation where the course of action was clear and justified, I would do what I could to prevent someone in my presence from being injured or killed. If I felt I could have stopped someone from being maimed or killed and I sat idly by I would feel terrible.