I had previously posted about one of my oldest but still frequently used scripts which gathers all tabs from a window into a text list to be pasted in an email or something like that.
I have recently adapted that script to do something new. This new script will gather the tabs in the frontmost Safari window and create a note in the Notes app with all the links (then, presumably, you would want to clean out and close most of the tabs)
Also I learned that the Safari tabs from all your Macs and iOS devices are stored in the `~/Library/SyncedPreferences/com.apple.Safari.plist` and extended the script to read that instead of grabbing them directly from Safari:
To use it is probably easiest to enable the Script menu (in Script Editor > Preferences) and drop the scripts in the `~/Library/Scripts/Applications/Safari` folder.