mind

He arrived very late, but it didn’t mind; I just wanted to see him.
He arrived very late, but I didn’t mind; I just wanted to see him.

Mind means to feel annoyed or unhappy about something. The subject is the person who has this feeling: ‘There is some noise, but I don’t mind.’

Matter means to be important. We often use it as its subject: ‘There is some noise, but it doesn’t matter.’

Compare: ‘I don’t mind.’ ‘It doesn’t matter.’