All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Perhaps you are referring to what Imam Muslim cited in his Saheeh on the authority of Abu Hurayrah that the Messenger of Allah said: “When a person dies, all his good deeds cease except for three: a continuous charity, knowledge from which people derive benefit, and a righteous child who supplicates Allah for him.” [Muslim]
One of the best supplications to be recited in favor of the deceased parents is asking Allah, The Exalted, to confer mercy on them. He Says (what means): {…and say, “My Lord, have mercy upon them as they brought me up [when I was] small.”} [Quran 17:24]
Also, asking Allah, The Exalted, to forgive them. The Prophet said: “A man will be raised in status in Paradise and will say: ‘How did this happen?’ It will be said: ‘By virtue of your son asking forgiveness for you.’” [Ibn Maajah, Al-Booseeri: authentic]
Moreover, you may recite the supplications mentioned in Sharee‘ah texts, asking Allah, The Exalted, to bless them with Paradise, raise their ranks therein, save them from the torment of Hellfire, the torment of the grave and its Fitnah (trials), and to make their graves spacious and illuminate them. It was cited in Saheeh Muslim on the authority of Umm Salamah that she said: “The Messenger of Allah entered upon Abu Salamah when his eyes were still open shortly after he died. He closed his eyes and then said: 'O Allah! Forgive Abu Salamah, raise his rank among those who are rightly-guided, and grant him a successor from his descendants who remain behind. Forgive us and him, O Lord of the Worlds, make his grave spacious for him and illuminate it for him.'”
It was also cited in Saheeh Muslim on the authority of ‘Awf ibn Maalik Al-Ashja‘i that "the Prophet was once offering the funeral prayer, and he supplicated for the deceased, saying: ‘Allaahumma ighfir lahu warhamhu wa‘fu ‘anhu wa-‘aafihi, wa-akrim nuzulahu wa-wassi‘ mudkhalahu, waghsilhu bi-maa’in wa-thaljin wa-barad, wa naqqihi min al-khataaya kama yunaqqa ath-thawbu al-abyadhu min ad-danas. Wabdilhu daaran khayran min daarihi wa-ahlan khayran min ahlihi, wa-zawjan khayran min zawjihi, wa-qihi ‘athaab al-qabri wa ‘athaab an-naar. (O Allah! Forgive him and have mercy on him. Grant him pardon and safety. Make his resting place a noble one and facilitate his entry. Wash him with water, snow and hail. Purify him from sins as a white garment is cleansed of dirt. Give him a home better than his home (on earth), a family better than his family (in the worldly life), and a wife better than his wife (in the worldly life). Spare him the trial of the grave and the torment of Hellfire).’”
Allah Knows best.