The heart develops black spots due to sins
the Messenger of Allah ﷺ said, “When the servant ˹of Allah˺ commits a sin, a black spot appears upon his heart. If he repents, it is polished away. But if he repeats, ˹the black spot˺ increases until it grows large in his heart. That is the "rān" that Allah mentions in His Book: “Nay! But on their hearts is the rān...” [Muṭaffifīn 83:14]
قَالَ رَسُولُ اللَّهِ ﷺ «إِذَا أَذْنَبَ الْعَبْدُ نُكِتَ فِي قَلْبِهِ نُكْتَةٌ سَوْدَاءُ۔ فَإِنْ تَابَ صُقِلَ مِنْهَا فَإِنْ عَادَ زَادَتْ حَتَّى تَعْظُمَ فِي قَلْبِهِ فَذَلِكَ (الرَّانُ) الَّذِي ذَكَرَهُ اللَّهُ ﷻ {كَلَّا بَلْ رَانَ عَلَى قُلُوبِهِمْ} [المطففين 14]»