Ibn Umar (Allah be pleased with them) reported Allah's Messenger (may be upon him) having said this: Accept the feast, when you are invited.
The Prophet Muhammad ﷺ was known for his kindness and hospitality towards others, so this hadith serves as a reminder for all Muslims to follow in his footsteps by being courteous and respectful when someone extends an invitation towards them. By doing so, we can show our appreciation for those who have taken the time out of their day to invite us into their home or event.