A Muslim believes in the Day of the Judgement. This world as we know it will come to an end, and the dead will rise to stand for their final and fair trial. On that day, all men and women from Adam to the last person will be resurrected from the state of death. Everything we do, say, make, intend and think are accounted for and kept in accurate records. They are brought up on the Day of Judgement.
One who believes in life after death is not expected to disobey God. They will be ever-conscious that God is watching all their actions and the angels are recording them.
People with good records will be generously rewarded and warmly welcomed to Paradise. People with bad records will be fairly punished and cast into Hell. The real nature of Heaven and Hell are known to God only, but they are described by God in familiar terms in the Quran.
If some good deeds are seen not to get full appreciation and credit in this life, they will receive full compensation and be widely acknowledged on the Day of Judgement. If some people who commit sins, neglect God and indulge in immoral activities seem superficially successful and prosperous in this life, absolute justice will be done to them on the Day of Judgement. The time of the Day of Judgement is known by God alone.