While there's no one secret to feeling as though you've lived a fulfilling life, it certainly helps when you can look back on what you've achieved with some fondness and pride.
The best part is that what you actually accomplished can take a kind of backseat in that thought process. Not everything has to be about helping rockets safely make it to space or finding a cure for a disease, after all. As long as it gave you a sense of satisfaction at the time and continues to now, that's the important part.
And just to illustrate how serious I am about this, just take a look at how proud these folks seem to be about accomplishments that many of us straight-up wouldn't understand.