Things placed close together tend to feel related. Move them apart and that connection weakens. Before adding a box, a rule, or another label, try changing the gap.

FIG. 02 / Equal distance — an open relationship
STONELEAFPAPERGLASS
FIG. 03 / Unequal distance — two suggested groups
STONELEAF
PAPERGLASS

Make the relationship intentional.

Neither arrangement is the correct one. The useful question is whether the grouping matches the information. A heading belongs closer to the paragraph it introduces than to the paragraph above it. A caption needs to feel attached to its image.

Large margins cannot rescue unclear internal spacing. Work from the inside out: first the space between related details, then the space between groups.