How to understand yourself better?

I often feel lonely and it feels so empty. Tried to find someone to talk to but after I talked a bit, it felt meaningless to me and I stopped talking with them, It was just a shallow talk, something is missing but I dont know what is it. The only thing that free me from this thought is programming. But its not healthy, I have been doing it for years. I have no one to call a friend, I want to change