Different ways of doing it and
depends on your Printer/Firmware! Gcode/Mcode usage is different so, you need to dig into it a bit...
I have different printers and the 'Same' G/M codes do not work on all - it requires Trial & Error.
Example Result screenshot below with a Nut inserted.
Summary: Generally, Three simple ways of doing it...
Option 1) Two Process; One for the lower section, stopping at desired height, and Second process for continuing from the stopped-at height.
Option 2) Using a Script to Pause at Height/Layer. Then, continuing the print.
Option 3) Using the Pause/Move/Resume feature on Printer
Regarding Option 1): Screenshot. Depending on your Printer/Firmware, you may be able to use the Move Extruder feature on printer after it stops at desired layer/height the, select Resume from printer’s menu.
I can do it this way on my Prussa printers with Marlin firmware.
Regarding Option 2) I have scripts that Pause, Move the extruder to front of printer (to get out of the way and change filament is desired).
Pause commands go in the ‘Additional Terminal Commands field at bottom of Scripts panel.
Regarding Option 3) I tweaked/re-coded the Firmware to provide Pause and Resume but, most likely beyond a general users knowledge/skill/interest.
I recommend seeing if your printer does Pause & Resume (and, if you can issue move commands or select from Menu to do it while it’s paused.
EDIT: After posting, I looked through my paperwork and was reminded of a Very Simple way to Pause, Move extruder and Resume: It will depend on your printer but, on my printers, I can Trip the Broken-Filament switch and the Printer automatically Pauses, Moved the extruder to front of machine and waits for me to Press the Button to Resume. I just confirmed it still works