Anas (May Allah be pleased with him) said:
The Prophet (ﷺ) said, "He who has eaten from this plant (i.e., garlic) should not approach us and should not offer Salat (prayer) along with us."[Al- Bukhari and Muslim]. (DE)
App reference (DE): Book 18, Hadith 192 (DE)
Arabic/English book reference (DE): Book 18, Hadith 1702 (DE)