Script for multiple actions where to put it?

Hello, stupid question. Where do I put the scripts for automation? I’d like to create a script that notifies me, my wife and turns on a light if the door is open while the alarm is set.

I’ve got a simple automation that notifies me. So I know that part is working. But with multiple actions, I think I need a script? Where do I put that? what is the file name format?