You can also use self contained nm splices-
https://www.homedepot.com/p/Tyco-Electronics-Romex-Splice-Kit-2-Wire-1-Clam-A22899-000/202204326Tyco Electronic's Non-metallic splice and tap kits provide a fast and reliable method for splicing or tapping 2 wire w/ ground and splicing 3 wire w/ground non-metallic cables up to 300 volts. They are designed and approved for use in rework within existing structures. Splice and Tap Kits also eliminate wire nuts for installation and replace the conventional method for adding a splice or tap for non-metallic cable without the need for exposed and unsightly junction boxes. NEC approved Article 334-40b.