@hemicyon set you on the right direction if you want to build your own.
I feel I am “killing a fly with a hammer” with the remainder of my response but here I go anyway.
Peter Lewis posted a collection of his macros in Best Examples of Keyboard Maestro Macros - #6 by peternlewis
One of these is the “Rename Files to Creation Date” macro. With some minor modifications to his macro you will have a robust tool to address your use case.
K-Thx-Bye!
