If you can ever compensate for them at all. It’s basically impossible to make lifelong friends after 35-ish. Maybe that’s why all the seniors I know are inflexible about relocation, among the many other reasons. Too much damage for a job you might not even like (who knows, it can go either way despite best attempts).
During COVID, I made friends who are 10/25/40ish years older than me. I firmly believe we will be lifelong friends, i.e. til death do us apart.
Lasting friendships form in mysterious ways. You need only be open to the possibility.