To export your Google Maps starred locations:
Go to Google Bookmarks: https://www.google.com/bookmarks/
On the bottom left, click "Export bookmarks": https://www.google.com/bookmarks/bookmarks.html?hl=en
After downloading the html file, run this script on it to generate a KML.
It's hacky and doesn't work on all of them, but it kinda works.
The idea here is great, but unfortunately Google have been stirring around in their products, and the only way since a little while to export saved places, is via Takeout - select "Saved".
This will produce a file containing all saved places, sure enough, but:
So this script will have probably lost its usefulness some years ago 😞