How did you cope with feeling alone?

I think everyone goes through that period in their lives when they feel alone, and the sad truth is no one really likes feeling truly alone all the time, so how did you cope? (Ik it might sound like a stupid question and not really all that serious but it’s something that has affected me and I don’t have anywhere else to ask😭)