How do I stop an AppleScript script that is stuck in an endless loop without restarting my Mac?
https://support.apple.com/en-il/guide/script-editor/scrptedshtcut/mac

The answer is indicated here. Command + period (.)