How to be there for someone

So whenever i am trying to console someone, namely my boyfriend. I tend to do the whole "im sorry, i know how you feel" or "it will be okay" and I feel like thats making it about me or dismissing the way he feels..i want to get better at comforting and being there for people..Any tips?? I know I'm overthinking its just, i want to be better and i know when I am upset the last thing i want to hear is everythings fine, or have someone talk about themselves...idk lol