A man from the Ansar came to the Prophet ﷺ covered in armor and asked, "Messenger of Allah, shall I accept Islam or fight?"He replied, "Rather, accept Islam first, then fight."So the man embraced Islam, then fought, and was killed. The Messenger of Allah ﷺ said, "He worked little and was rewarded much."
حدثنا وكيع عن إسرائيل عن أبي إسحاق قال سمعت
جاء رجل إلى النبي ﷺ من الأنصار مقنع في الحديد فقال يا رسول الله أسلم أو أقاتل قال لا بل أسلم ثم قاتل فأسلم ثم قاتل فقتل فقال رسول الله ﷺ هذا عمل قليلا وأجر كثيرا
Its isnad is sahih. It is found in Bukhari, 6/241, no. 2808, Fath, in the book of jihad, chapter on doing righteous deeds before setting out for battle, and in Muslim, 3/1509, no. 1900, in the book of leadership, chapter on the confirmation of paradise for the martyr.