The Shulchan Aruch · Orach Chayim
אורח חיים תרע״וOrach Chayim 676
Siman 676 of 697 in Orach Chayim — 5 se'ifim
הלכות חנוכהLaws of Chanukah· siman 676
Se’if 1א׳
הַמַּדְלִיק בְּלֵיל רִאשׁוֹן מְבָרֵךְ שָׁלֹשׁ בְּרָכוֹת: לְהַדְלִיק נֵר חֲנֻכָּה, וְשֶׁעָשָׂה נִסִים, וְשֶׁהֶחֱיָנוּ; וְאִם לֹא בֵּרַךְ זְמַן בְּלֵיל רִאשׁוֹן, מְבָרֵךְ בְּלֵיל שֵׁנִי אוֹ כְּשֶׁיִּזְכֹּר.
The Order of the Blessing and Lighting, Has 5 Sections: The person who lights on the first night makes three blessings: "l'hadlik ner chanukah (to light Chanukah candles)" and "sh'asah nissim (who did miracles)" and "shehechiyanu (that we were sustained)". If they did not remember the blessing pertaining to time (i.e. the "shehechiyanu") on the first night, they can make that blessing on the second night or whenever they remember.
Se’if 2ב׳
מִלֵּיל רִאשׁוֹן וָאֵילָךְ מְבָרֵךְ שְׁתַּיִם: לְהַדְלִיק, וְשֶׁעָשָׂה נִסִים. הַגָּה: וִיבָרֵךְ כָּל הַבְּרָכוֹת קֹדֶם שֶׁיַּתְחִיל לְהַדְלִיק (מַהֲרִי"ל).
After the first night they make only two blessing, "l'hadlik (to light)" and "sh'asah nissim (who did miracles)". Rema: And they should say all of the blessings before they begin to light (Mahari"l).
Se’if 3ג׳
מִי שֶׁלֹּא הִדְלִיק וְאֵינוֹ עָתִיד לְהַדְלִיק בְּאוֹתוֹ הַלַּיְלָה, וְגַם אֵין מַדְלִיקִין עָלָיו בְּתוֹךְ בֵּיתוֹ, כְּשֶׁרוֹאֶה נֵר חֲנֻכָּה מְבָרֵךְ: שֶׁעָשָׂה נִסִים, וּבְלֵיל רִאשׁוֹן מְבָרֵךְ גַּם: שֶׁהֶחֱיָנוּ, וְאִם אַחַר כָּךְ בְּלֵיל ב' אוֹ ג' בָּא לְהַדְלִיק אֵינוֹ חוֹזֵר וּמְבָרֵךְ: שֶׁהֶחֱיָנוּ.
Whoever didn't light, and isn't going to be lighting that night, and also their household didn't light on their behalf, when they see a chanukah candle they should make the single blessing of "sh'asah nissim (who made miracles)" and if it's on the first night, they should also say the blessing of "shehechiyanu (for sustaining us)" and if on the second or third night they can light themselves, they do not repeat the blessing of "shehchiyanu (for sustaining us)"
Shulchan Aruch, Orach Chayim — Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Community Translation — CC0