Script to create folder with same name as start of filename and move files with same start name into folder
Well, you know - superuser really isn't a code writing service...
What you're asking for, is a real "beginner project" in e.g. Python.
The names seem to have a "base" and then a 5 digit number, just create a simple loop that creates each name in a string, and prints them, one on each line - as first attempt.
Then as you have this, you really should not have any problem using those strings, one at a time, to create folders and move files.
If not by any other means, so then by: https://stackoverflow.com/questions/89228/how-to-execute-a-program-or-call-a-system-command
Have a go!