“The Messenger of Allah (ﷺ) said: ‘Whoever fasts Ramadan and spends its nights in prayer, out of faith and in hope of reward, his previous sins will be forgiven.’”
Sunan Ibn Majah Book 5, Hadith 524