Does running protect your bones better than swimming?
Running gives your bones clearly more mechanical stimulation than swimming, and that difference is reflected in bone density. Hard comparative data on swimming are lacking, but based on what we know about impact loading, the expectation is that running protects your bones better.
Running demonstrably protects your bones. Middle-aged and older people who run regularly have around 40% more bone mineral than peers who do not. That is a large difference and applies to both men and women. This is a comparative study, so cause and effect have not been proven beyond doubt, but the association is strikingly strong and biologically well explained: with every stride your body weight exerts mechanical pressure on your bones, and that pressure stimulates bone formation.
On the basis of the available studies, we cannot say anything concrete about swimming and bones. There is simply no usable data on swimmers in the sources at hand. What we do know is that sports without mechanical loading of the skeleton, such as road cycling, actually reduce bone density, particularly in the hip. In terms of skeletal loading, swimming resembles cycling more than running: your weight is supported by the water, and that triggering pressure on your bones is largely absent.
Cyclists who want to improve their bone density can do so by adding impact exercises to their routine, such as running or off-road cycling. That is currently the only approach for which there are indications that it works in people who subject their bones to little impact loading. The evidence for this is still limited, but the reasoning aligns with what we know about how bones respond to loading.
Animal research in mice shows that running movement can counteract bone breakdown via mechanical signalling pathways in bone cells. That is an interesting mechanistic pointer, but it says little as yet about what this specifically means for humans.
Running and bone density: one cross-sectional study (PMID 3945033) in 50-72-year-olds. Cycling and bone density: multiple studies summarised (PMID 35734792). Swimming: no direct data in the supplied sources. Animal research on running movement: PMID 37611084.