Reliable procedure to swap/replace filament

I finish my first spool of filament(hurray) .

I am using Bjonr’s latest firmware . Single mode.

The filament was running through the run-out filament sensor,before the spool was ended I tried to change the filament, I paused the print , removed the filament from the run out sensor, removed the old filament from the head and Inserted the new filament.

I was too slow to remove the filament and swap it and the extruder lost heat and I got an Thermal Runaway Error and I had to re-start the print.

There is a reliable way to change filament mid print when the printer is running out of filament ?

Or in any other mid print situation, like pausing swapping filament and restarting the print.

I read that in other situations, we can use the M600 command , but I think that is too advanced for me at this stage.

I saw some comment from sovol (original firmware) that when you pause you have 3 minutes to swap before the head begins to cooldown.