On the tech side I've stayed late to help push projects through. People don't forget. I have friends from 7+ years ago, some who's weddings I've stood at. We _still_ talk about the time we made a miracle happen and got the project out the door the night before. We _still_ talk about the time production went down in front of 1,000,000 users and we rage coded a solution together.
Compound interest works with relationships just like it works with money. Real trust builds over years. I've been the tag along for a few projects now that I never would have found without being friendly and helpful in the past.
I ask because another common failure mode with getting stuck is to essentially 'rage code' into working free overtime and accepting bad conditions all because of the camaraderie i.e. someone is exploiting the positive characteristics of bonding. If it matches with your goals, that's fine, but often people look back and realise they were essentially exploited in this way (see: team-building exercises in a lot of minimum-wage style jobs to see a pure & distilled form of this kind of thing.)
Perhaps just something to be aware of! I don't mean to be overly negative, so apologies in advance if I've gotten a completely wrong impression here, but I do believe the general risk of this failure mode in career/life exists and is common.
That fear drove me to get great at operations. Now I've made a reputation as the person who can enter a dumpster fire project that's always behind and breaking and change it to a project that the whole team can deploy at 5:00pm on a Friday, close their laptops, go home and play with their kids and rarely get paged.
A more concrete example is I did great work at one company for 2.5 years then followed my boss when he quit to another company for a significant raise and title bump. The best part was even though it was a new job, I had 2.5 years worth of trust equity with my boss, so I could push new ideas through to the rest of the org through him without having to spend months building trust with a new boss first.
This is a really great way of putting it because compound interest also works on social debt (being a dick). Build up a lot of it, and you won't go anywhere.
There's been times where someone's applied to a job I've worked at and I've noticed they worked at a previous company with a mutual past colleague. I've texted the colleague and asked "Hey, so and so's applied here. What was your experience with them?". Oftentimes it's "Oh so and so's great! We made some miracles happen at HerpDerp Co." but every once in a while I'll get back "So and so is fine." or in a few situations "Honestly So and so was a good engineer but was absolutely terrible to work with on a team. Very negative to other people".
It's a small world!
My life experience is that there is sort of a karma. I helped a lot of people become better at their jobs and expected nothing in return. Some of those people went off to be extremely successful, and they wanted me to come along with them in making tons of money. Expecting nothing in return is the key. People know if you're keeping score.