He who observed the fasts of Ramadan with faith and seeking reward (from Allah), all his previous sins would be forgiven, and he who observed prayer on Lailat-ul- Qadr with faith and seeking reward (from Allah), all his previous sins would be forgiven. (Using translation from Muslim 760a)
أَنَّ النَّبِيَّ ﷺ قَالَ «مَنْ قَامَ رَمَضَانَ إِيمَانًا وَاحْتِسَابًا غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ وَمَنْ قَامَ لَيْلَةَ الْقَدْرِ غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ»