Sports. CrossFit and similar social sports have been healthy for me and for many others, and I think the community is at least equal to the exercise in improving people's lives.
Not saying this is the only way, but it made a big difference for me and my friends. I realize the physical challenges are artificial, but so is an Advent of Code puzzle when you already have a day job. Hard things are worth doing because they're hard, and they're even better when done together with those you love.