Somebody shared this in a different comment, but the OneTab extension looks like exactly what you are asking for: https://www.one-tab.com/ (minus it being builtin).
I actually used to use AppleScript to grab open tab URLs in Chrome but I switched to Firefox and AFAIK, Firefox doesn't support AppleScript.
tell application "Chromium"
set tabCount to get count every tab of window 1
repeat with i from 1 to tabCount
set currentUrl to get URL of tab i of window 1
end repeat
end tell
I'd like a browser function that says "open a text file and save all the URLs"