Ali reported,

We were at a funeral in Baqi al-Gharqad when the Messenger of Allah ﷺ came to us. He sat down and we sat around him. He had a small staff with him, and he lowered his head and began poking at the ground with it. Then he said, "There is not one among you, indeed not a single soul that is born, for whom Allah has not already written its place in Paradise or in the Fire, and for whom it has not already been written whether it will be wretched or blessed."A man said, "Messenger of Allah, then should we not simply rely on what is written for us and abandon action?"He replied, "Whoever is among the people of blessedness will come to do the deeds of the people of blessedness, and whoever is among the people of wretchedness will come to do the deeds of the people of wretchedness." Then he said, "Act, for each is made ready for his path. As for the people of blessedness, they are made ready for the deeds of the people of blessedness, and as for the people of wretchedness, they are made ready for the deeds of the people of wretchedness."Then he recited, "As for one who gives and fears Allah, and affirms the truth of what is best, We shall ease his way to what is easy. But as for one who is miserly and thinks himself self-sufficient, and denies the truth of what is best, We shall ease his way to hardship" [Layl 92:5–10].In another version the narrator said that he took up a twig, and did not say a small staff. Ibn Abu Shayba said in his version, on the authority of Abu Ahwas, "Then the Messenger of Allah ﷺ recited."

Muslim 6732

Sahih

حدثنا أبو بكر بن أبي شيبة وهناد بن السري قالا حدثنا أبو الأحوص عن منصور بهذا الإسناد في معناه وقال فأخذ عودا ولم يقل مخصرة وقال ابن أبي شيبة في حديثه عن أبي الأحوص ثم قرأ رسول الله ﷺ

مسلم 6732صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Decree
Chapter
How the human is created in his mother's womb and the recording of his provision, lifespan, deeds, misery, and happiness
Numbering
Darussalam 6732
Muslim 6732