Change file name based on date in filename and move file

I am a real newbie to scripting, so please be gentle!
I thought this would be simple and I could use Automator alone, but no. I download files from my bank into my Users/john/downloads folder. I would like to have a Folder Action that automatically moves them (there are more than one there now) to a file “icloud/bank/current account” and rename them. The current name is “Statement – 11223344 – 55667788 – 01-01-2020 – to – 31-01-2020.pdf” The first 8 numbers is a sort code, the second set is an account number. The dates are not helpful as I like to file things in date order, so new name would be “202001 current account Jan 21”.
I tried automator but you can only change the date to the date of the action (and as a statement it always comes out in the next month). I also found it better to move the files first and then try to change the name.
I then wrote some AppleScript that worked with one item (but, rookie error, I have lost it!). It was very similar to this:

on run {input, parameters}

set fileName to "Statement--11223344-55667788--1-01-2021-31-01-2021.pdf" as text
set astid to AppleScript's text item delimiters
set AppleScript's text item delimiters to {"--", "-", "."}
set delimitedList to every text item of fileName
set {part1, part2, part3, part4, part5, part6, part7, part8, part9, part10} to fileName's text items
set AppleScript's text item delimiters to astid
set fileName to part9 & part8 & " " & "Current Account" & "." & part10

return input

end run

As it succeeded I tried to create a “repeat” so it would do the same for each item in the list. I added these two lines:

set ListItem1 to name of (POSIX file in input as alias)
set fileName to name of ListItem1
at the beginning.

The list is the input from the Automator action “Move files to folder”, an action which works. I set a Variable to Item1 in the list.
However I get this: "Can’t make POSIX file of {alias “Macintosh HD:Users:name:Documents:Moved Files/Statement – 11223344 – 55667788 – 01-01-2020 – to – 31-01-2020.pdf”

A few questions:

  1. Is it better to move files before renaming them?
  2. Why isn’t there a “building block” in automator to change the name based on input info? Can these be created?
  3. The output of the moving files action - is it a list, a list of files, a POSIX list, an alias list? And how are we to know?
  4. How do I turn the input into something that AppleScript will recognise? Should it be an alias, a Posix ref or HDS?
  5. How to create the repeat? I have only 25 files, but the principle presumably could apply if there are hundreds.

Thank you for getting this far! And I am using Big Sur on a 2017 iMac.

Help welcomed!