I don’t mind and and I don’t care are not the same but they can be used in the same situation.
One suggestion is to have more practice speaking with an English native speaker so that it would be easier for you to understand this problem.
“ I don’t mind” is the same with “it’s okay with me.”
However, “I don’t care” can be very offensive because it could mean that it’s not important to me or it’s not much of a big deal for me.
For an example:
“Do you want to paint the wall blue or brown?”
“I don’t care.”
“I don’t care. Whatever you like.”
Your tone and your expression here is the most important tip in speaking English.
So if you want to be on the safe side, it’s recommendable to use, “I don’t mind.”
But I don’t care specifically means, “Whatever is okay, it’s not so important for me.” You’re just expressing your priorities.