I pasted your script in ScriptEditor.
I created a folder "A" with files "a" and "b".
I created an empty folder "B".
In my desktop I createad a text file with two lines with the names of the files.
I started your script, selected the file containing the list, selected the origin folder, selected the destination folder.
It worked as expected.
Note: the first thing I saw was a dialog saying that the script wanted to access files in the Desktop. I allowed it.
Without that, it would not have worked, of course.
So the script does work in Monterey. Now we need to try and figure out why it is not working for you.
Are you launching the script from Script Editor? From Automator? Or as an application on its own?