Every one of these scripting/Automator solutions are custom to the individuals need and no script is universal in its ability to process different file renaming problems. ChatGPT is worthless for this approach too.
The solution that I wrote for the OP in the linked post split CSV by commas and I see semi-colons in your content, so of course the script needs revision for your renaming effort.
Using your before and after file naming convention in a newline terminated CSV with semi-colon separators and no headings, the following script successfully renames to your filename goal.
Before:

After:


Follow the exact steps for creating the Automator solution in Batch file rename from Excel spreadsheet - Apple Community. Replace the contents of the Run Shell Script action with this revised code:
#!/bin/zsh
#
: <<'COMMENT'
Process two column CSV by line, and move (rename) old filename to new filename
in specified directory location. Report files that do not exist.
COMMENT
# zsh shell arrays are 1 based
OLDFILE=1
NEWFILE=2
# drop into selected folder chosen from Ask for Finder Items action
cd "${1}"
CSVFILE="testrename.csv"
# a regular array to hold parts of CSV row
typeset -a csv=()
let cnt=0
while read -r line
do
# split csv line on semi-colons into array elements
# remove double-quotes from each column entry — if they exist
csv=("${(@s/;/)line}")
old_file="${csv[$OLDFILE]:gs/\"//}.jpg"
new_file="${csv[$NEWFILE]:gs/\"//}.jpg"
# if old filename exists then rename it
if [ -e $old_file ]; then
mv "${old_file}" "${new_file}"
(( cnt++ ))
else
echo "${old_file}" >> ~/Desktop/Errors.txt
(( cnt-- ))
fi
# Only if created on Windows, remove carriage returns from line endings
done < <(perl -lne '$_ =~ s/\015?//g && print;' "${CSVFILE:a:l}")
# if return code from above is 0 then processing was successful and we return
# true with the renamed file count
[[ $? -eq 0 ]] && echo "true $cnt" || echo "false $cnt"
Tested: macOS 13.4.1 (c).