وَمَن يَكْسِبْ إِثْمًۭا فَإِنَّمَا يَكْسِبُهُۥ عَلَىٰ نَفْسِهِۦ ۚ وَكَانَ ٱللَّهُ عَلِيمًا حَكِيمًۭا
And whoever commits a sin only earns it against himself. And Allah is ever Knowing and Wise.
Those who commit a minor or major sin will have to face the punishment themselves. No one else will be held responsible. Allah knows the actions of His servants and is Wise in His planning and legislation.