Match VT to artist

I’m trying to create a script for a feature on my show. It consists of a fun fact about an artist followed by a song by that artist.
I know very little about scripting so have been using ChatGPT to help me. What I’m looking for is a script that selects the fun fact VT and the matches it to the artist.
The VT is identified by the artist name in the tag and the same goes for the song.
The script I got with help from ChatGPT is this
Test Script VT.mls (1.8 KB)
When I try to run it an error message comes up " error running script: error uknown identifier ‘createplaylistitemfromdatabase’ "
So I entered the error message in ChatGPT and it generated the following script
Test Script 2 VT.mls (2.1 KB)
This also didn’t work with error message " Error running script [error] (13:27) unknown identifier ‘Getfiles’ "

So I’m looking for help in getting the script right please