Overall meaning :
Allah will render vain the good deeds of those who reject the truth and turn people away from His religion. As for those who believe in the truth, do righteous deeds purely for Allah’s sake and in accordance with His laws, and believe the Qur’an that He has revealed to His Prophet Muhammad—which is the Truth from their Lord—He will forgive their sins and set their affairs aright.
This will He do because the unbelievers follow falsehood, while the faithful follow the truth from their Lord. With such clarification of the ultimate outcome of both the believers and the unbelievers does Allah show people their own types and conditions.