I guess getting familiar with cuts and peeps might help. Although maybe it just comes down to experience
Indeed whenever your groups are not solidly connected you should consider whether disconnecting them is possible (because it usually leads to trouble - unless both groups can make life locally for themselves).
in the linked game B3 is “peeping” at your connection, threatening to push in and occupy the only point that would connect your two groups… But once you played enough games, I think you will just “see” it naturally, so I would not worry too much if it seems complicated for now.
Also just for funsies I left you a variation where I think white can still win the game even after the blunder