Interpersonal thoughtfulness

It's really pretty wild how straightforward it is if you think about it from the right perspective. Many people are taught how to do these super complex emotional things starting from birth. Many people aren't. The people that aren't are missing literal years of guided education just to be able to figure out how to do it.
You shouldn't expect to be able to teach yourself these things. It's not reasonable or fair to you.
Find a teacher. The only way to fix it is to talk about it and learn. If you're lucky enough to know and trust a person with particularly high emotional intelligence that's an option. A better option is therapy, but I know not everyone can afford that.
If you can afford a therapist, go get at it. It's gonna take work but the fact that you care enough to notice and desire a change says great things about you as a person.