It was narrated from Abu Hurairah, who was attributing it to the Prophet (ﷺ):
"When Friday comes, at every gate of the masjid there are angels who write down the people's names in the order in which they come, then when the imam comes out, they roll up the scrolls and listen to the khutbah. The one who comes early to the prayer is like the one who sacrifices a camel, then the one who comes after him is like the one who sacrifices a cow, then the one who comes after him is like the one who sacrifices a ram" until he mentioned a chicken and an egg.
App reference: Book 14, Hadith 23
English reference: Vol. 2, Book 14, Hadith 1387
Arabic reference: Book 14, Hadith 1397