This automatically keeps a record of your Spotify listening history in a Google Sheet. You can easily create a playlist from a subset of the songs you've recently played by selecting those song's Track URLs, creating a new playlist in Spotify and then pasting the URLs.