DEVONthink gets the creation date from the Finder when the document is added to the database.
And a PDF metadata date is not the file’s creation date. You are talking about two different things there. See the Appendix > Hidden Preferences section of the built-in Help and manual for the UsePDFDocumentDates command. Also, it is not required to use Terminal to enable this function. Read the note at the top of the section. Lastly, you will need to do a File > Rebuild Database to modify the creation dates on the already imported documents.
When asking many many script to ChatGPT unable to correct it
This is unsurprising and not an avenue I would even bother with. At the best, you’ll get a poorly written and slightly functional bit of code but (1) the code likely won’t be fully effective and (2) what will you have learned?
Your filenames in the examples here are very uniform. Is this what you expect from all the input documents?