Quran chapter 53 surah 53.

No person shall bear the sin of another person (Quran 53:38).

A person only earns punishment or reward from Allah for what they themselves have done (Quran 53:39).