How sins work?
When person sins, a black spot will be in heart, when person seek forgiveness from Allah or recite Quran, it will remove their black spot on his heart like a medicine to make them hear pure. Minor sins can wipe with good deeds and major sins need repentance.
When people die.
In afterlife once person died, their test is over, they will go to waiting room (Barzakh) waiting for the result in day of judgment. There are 2 sections of rooms one is for disbeliever who have dark face and other room is for the believers who have bright face. The angels will question people how they live their life. People will have sneak peek about themselves, for example they might have peace that will lead to heaven, or they might feel discomfort which can lead to hellfire, but not always, depends on Allah mercy. And the final decision is made on the Day of Judgement. Also, on Day of Judgement some people will be bright if they don’t have sins, but if they are sinful, they will be dark depends on sinful acts.
In summary:
Barzakh>Day of judgement> Heaven/hell.
Am I right?