Hrm.
- Either history or good communication. You can't make a new friend if you don't talk to them, but you can keep old ones by having a history together. It means including this person into your life and vice versa, to at lesat some part. You don't need a million super close friends and they don't either.
- I reach out, invite them to things if they're in-person, check in on their wellbeing if they've indicated publicly they are not well, etc.
- I also reach out more than once and see if they're interested in making friends or wanna keep things distant.
- They close off conversations, refuse invites repeatedly, and show you defensive/rude behaviour over small stuff.
That said everyone behaves in certain ways and people may desperately want to be friends and display "leave me alone" behaviour as a defence mechanism. You gotta feel things out.