I used to use “I don’t care” and “it doesn’t matter” as if they were equal and had the same meaning. But really, that was lazy thinking. See if you agree?
“I don’t care” is a way of saying either choice is fine with me. Choosing a restaurant when I have no preference. Pretty much daily and minor decisions.
“It doesn’t matter to me” is more decisive. Another person’s choice of what they eat, their appearance, sexuality, or religion? Responding to hearing gossip, as in: I don’t need to hear it. It is a way of saying not only that it isn’t up to me, but none of my business.
The awareness of this distinction helps clarify my thinking. Thai or Mexican for supper? I don’t care because both are excellent choices. OMG! That person has purple hair. It doesn’t matter to me. As they used to say in middle school, NUNYA.