Shulchan Arukh, Orach Chayim Siman 424
Can copy this into an AI, or connect the whole library to your assistant. For deeper learning, you can directly use the original seforim, sites, and apps.
דין הזכרת יעלה ויבא בברכת המזון. ובו סעיף אחד
מזכירין יעלה ויבא בברכת המזון ואם לא אמר אין מחזירין אותו ואם נזכר קודם שהתחיל הטוב והמטיב אומר ברוך שנתן ר"ח לעמו ישראל לזכרון הגה ועיין לעיל סי' קפ"ח סעיף ז':
Mishna Berura Yomi
The law of bringing up "Ya'aleh v-Yavo" in the grace after meals, which has one clause: We bring up "Ya'aleh v-Yavo in the grace after meals. And if it was not said, it is not necessary to repeat it. And if it is remembered before one started the fourth blessing, say, "Blessed be the one who gave Rosh Ḥodesh to His people Israel as a reminder." (Rema: See above, SA Orach Chayim 188:7.)