The Messenger of Allah ﷺ would not pray anything before the Eid prayer, but when he returned to his home, he would pray two rakahs.
كان رسول الله ﷺ لا يصلي قبل العيد شيئا، فإذا رجع إلى منزله صلى ركعتين.
Ibn Majah (1293), Ahmad (11226), Ibn Khuzayma (1469), and Hakim (1/297) all narrated it, all from the hadith of Ubaydullah bin Amr Raqqi, who said, Abdullah bin Muhammad bin Aqeel told us, from Ata bin Yasar, from Abu Saeed Khudri, and he mentioned it. Its chain is hasan because of Abdullah bin Muhammad bin Aqeel, for there is disagreement about him, but his hadith is hasan when it does not contradict others. Hakim said, "This is a rare sunnah with a sahih chain." Hafiz graded it hasan in Fath al-Bari (2/476) and also said, "The conclusion is that no sunnah prayer before or after the Eid prayer has been established, contrary to those who compare it to Friday prayer." End of quote.