the "first part" is an okay generalization and correct from a general public point of view:
You seriously need people and socialization to not have a degraded biological response. Very large meta-studies came up with a distilled number of factors that lead to a longer life span (with the caveat that they mean "healthier" longer, not bed-ridden at 30 and kept alive by machines for 40 years) they generally are:
-walking (you have a 1/4 chance of your death being from your heart. walking activates a natural pump to help blood flow from your legs upward, alleviating the strain on your heart. People who walk a LOT tend to live a long time because their heart doesn't give out as soon)
-Mediterranean diet as a whole: once in a blue moon, the shitty fad-diets get it right. The "Mediterranean diet" (rich in fish and greens, lower in everything else, more or less) leads to increased lifespan. The exact mechanisms are not fully understood, but its easy to see the effect population-wise.
Fasting- curious one, but in pretty much every mammal, including humans, the more you fast, the longer you live. Some thoughts behind it, but ignore the fasting-shills from /fit/, they peddle the pseudo-science of some youtuber with no sources. Truth is we don't exactly know why, but have some ideas that have to do with cells under starvation mode and their metabolism.
SOCIAL INTERACTION: A big one people seem to ignore. The number of people you talk to and are close to literally tracks with 1) your mental state (alzeihers-type stuff), and 2) your lifespan.
When people say "we are social creatures", that's not some cutesy-eat/pray/love shit. Our biology literally responds to how social we are. This includes life partners, obviously. But the more social and touch we have, the more we respond in the positive, from our biology's point of view. It also doesn't have to be straight-up "GF" level, but just deep connections in general.
After that though it gets wack