if you want to split your scripts up so that the script UI editor works and your files are split, look here or,
go into a terminal in HA and do this:
ln -f /config/scripts.yaml /config/#path_to_your_sub-folder/scripts.yaml
and in configuration.yaml do this:
script: !include_dir_merge_named /config/#path_to_your_sub-folder
Then put your split folders here for scripts. Add your other scripts in other xxx.yaml files into this folder and they will be used in the config as well.
This links a file placeholder in your sub-folder to contain the actual scripts.yaml data for the config process to use, and it allows the Home Assistant UI editor to parse, destroy, and re-create the /config/scripts.yaml file anytime it needs to for editing.
I didn’t care about the scripts UI editor until I started doing blueprints and needed the script UI editor to actually work.
(I haven’t tried, but I believe you can do the same trick with automations.yaml.)