Ali bin Abu Talib reported,

We were sitting with the Prophet ﷺ, and he had a stick with which he was scratching the ground. He said, "There is none among you whose seat in the Fire or in Paradise has not already been written."A man from the group asked, "Messenger of Allah, should we not then rely upon this and abandon action?"He replied, "No, keep working, for everyone is made easy toward that for which he was created."Then he recited, "As for the one who gives and is mindful of Allah" [Layl 92:5] to the end of the verse.

Bukhari 6605

Sahih

حدثنا عبدان عن أبي حمزة عن الأعمش عن سعد بن عبيدة عن أبي عبد الرحمن السلمي

عن علي رضي الله عنه قال

كنا جلوسا مع النبي ﷺ ومعه عود ينكت في الأرض وقال ما منكم من أحد إلا قد كتب مقعده من النار أو من الجنة فقال رجل من القوم ألا نتكل يا رسول الله قال لا اعملوا فكل ميسر ثم قرأ {فأما من أعطى واتقى} الآية

البخاري 6605صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Decree
Chapter
And the command of Allah is a decree determined
Numbering
Darussalam 6605
Bukhari 6605