I understand that there are flotation devices on the space capsule but I don't see them visibly deployed in this image
. There are other images where they are deployed and clearly visible above the water surface.
Capsules like Apollo and Orion are mainly open space internally (the crew cabin); they have no problem floating by themselves (like a metal-hulled boat would).
The conical capsule shape by itself will float in either of two orientations: stable 1 (base down, nose up) and stable 2 (nose down). In stable 2, the crew is hanging upside down in their seats and the hatches are underwater, obviously not a desirable condition, so the inflatable floats at the top end are to right the capsule if it lands nose-down or turns over in rough seas.
The larger ring float around the base both helps keep the capsule stable and insures against the capsule sinking due to water getting inside an open hatch after the crew gets out. The first Mercury capsules didn't have that kind of float, and were intended to be picked up by helicopter and flown to a recovery ship, but the heavier Gemini and Apollo capsules had to stay afloat longer, until the recovery ship could reach them and bring them aboard by crane.
The Gemini capsules had a different layout that appears to not have been nose-up stable, and its flotation system helps to keep it in the desired (hatches-up) orientation.
The Gemini capsule floated because it had thousands of hollow balls made of extremely thin aluminum, each composed of two half-spheres welded together, the size of ping pong balls, which were embedded between the inner and outer wall, for the exact purpose of flotation. Made by Seyer Buckner in St. Louis in 1965. Google Seyer Buckner Gemini in a newspaper archive such as newspapers.com and you'll find a long article about it. Here is a link to one published April 21 1965, page 5W, but it's a paid subscription:
There's also a discussion of these spheres used in Gemini capsules here:
The discussion goes back and forth about the details but there's even a blueprint of one design of a hollow sphere made of 5 mil thick 302 stainless steel sphere made from two hemispheres, labeled BALL - FLOATATION here:
+1
and welcome to Space! This is really interesting; I've added a few more links, I hope you don't mind. You are welcome to edit further. If you like you could post a new question asking for more details about the extent of usage of sealed, steel flotation balls as fill in early capsules. It's very possible that folks here could do a better job than what the collectspace discussion could come up with.
$\endgroup$