Centre of buoyancy and centre of gravity
Two separate points, and what their relative position decides.
The centre of buoyancy is the single point through which the whole upward push of the displaced water can be treated as acting, the centre of gravity is the single point through which the whole downward pull of weight can be treated as acting, and whether a floating or submerged object rights itself, tips over, or spins on the spot depends almost entirely on where these two points sit relative to each other rather than on how large either force is.
Two spread-out forces, each reduced to one point
Weight and buoyancy are both spread across the whole body, but for judging stability each can be replaced with a single point: the average position of all the mass, and the average position of all the displaced volume. While those two points sit directly above and below one another, the two forces act along the same vertical line and nothing tends to rotate the body. Tilt the vehicle even slightly and that alignment breaks, and the offset between where weight pulls down and where buoyancy pushes up creates a turning effect, a torque, that either drives the tilt further or works to undo it.
A balloon with a weight on its string
A helium balloon with a small weight taped to the bottom of its string shows the arrangement well. Released indoors, it settles into a steady upright orientation, string hanging straight down, because the lift acting through the balloon sits directly above the pull of the weight. Tape that same weight near the top of the balloon, close to where the lift itself acts, and the balloon no longer settles at all, tumbling as it drifts because the two points have nothing holding them apart. Only the relative position of the two points changed.
Why the gap between the points is a safety margin
What restores a tilted body is the horizontal distance that opens up between the two points as it rotates, because a torque is a force multiplied by how far its line of action has strayed. Double the vertical gap between the points and, for the same small tilt, the sideways lever arm doubles and so does the restoring torque. A pair of points separated by only a hair's width has almost nothing to work with, and a disturbance too small to matter in a more generously arranged design can tip it from stable to unstable. That is why the separation is rechecked whenever anything heavy is moved inside the hull.
Standing up in a small rowing boat or a canoe is the same problem felt from inside. Sitting low on the floor keeps everyone's combined weight close to the water, well below where the hull's buoyancy acts. Stand up and each person's centre of mass rises well above the gunwale while the hull stays exactly as it was, so the gap doing the work shrinks and the same wobble that went unnoticed while seated suddenly feels alarming.
Placing heavy parts low and volume high
Locating both points, with a comfortable margin, is one of the first calculations done on any new hull, because moving either later is expensive: shifting the centre of gravity means relocating heavy components like batteries or motors, and shifting the centre of buoyancy means reshaping the hull or moving where its enclosed volume sits. Designers put the heaviest components as low as the layout allows and the largest enclosed volumes as high as it allows, pulling the two points apart deliberately while it is still cheap to do so.
The buoyancy point moves when a floating hull tilts
The simple vertical rule does not describe what happens once a floating body starts to roll, because its centre of buoyancy is not fixed inside the hull the way its centre of gravity is. It shifts as the underwater shape changes with every degree of tilt, and a surface hull that looks marginal by the vertical rule can still be comfortably stable once that shift is counted, which is exactly the twist that separates an ordinary boat from a fully submerged vehicle.