The answer to 'do I need junction box' is yes, you generally need a junction box when working with electrical wiring. A junction box is a metal or plastic enclosure that houses the connections between electrical wires, providing a safe and secure way to join and protect the wiring. Junction boxes are required by electrical codes to ensure proper insulation and to prevent electrical fires or shocks.
Junction boxes serve several important functions. They protect wire connections from damage, provide a stable mounting point for outlets and light fixtures, and allow access for future maintenance or modifications. They are typically installed at points where wires come together, such as at light fixtures, outlets, switches, or where new wiring is added to an existing circuit.