The timeline for such high frame rate video (120/240 fps) should have extra controls to set which part of the video should get a slo-mo effect. You can set that to none (by having the start and stop of the effect together). Other player software or conversion software will likely not know what to do with the slow-mo settings and ignore it. Exporting from QuickTime Player would lock the effect through conversion to a fixed lower frame rate throughout the video.
and how do I prevent this from happening again?
Be sure that the Camera app isn’t set to “sʟᴏ-ᴍᴏ” mode accidentally.
Watch the left-right swipeable Mode options directly above the record button.
I don’t think that there is an option to disable this mode option altogether.
iPhone camera basics - Apple Support
Record videos with your iPhone camera - Apple Support
Adjust slow motion on iPhone - Apple Support
Adjust slow motion in QuickTime Player on Mac - Apple Support
(glass kettle with blue LED, at the boiling point)