Is it possible to stop the execution of a script temporarily on macOS?
If executed from the shell you can type

CTRL + Z


this will send the "terminal stop" signal (SIGTSTP) to the process and the system  won't schedule any more CPU time to the process.

You can then restart it by typing

fg


on the same shell.