Macro: Name and Save Last
macro.nameAndSave Save the most recently recorded macro under a name so it persists across sessions.
How to run it
Open the command palette (M-x in the Emacs keymap) and search for Macro: Name and Save Last, then press Enter. It has no default keybinding, but you can bind one in Settings → Keymaps.