Unix script to consolidate files based on creation date

Job ID: 35664056

Budget: $10 – $30 USD

I have a folder with 10,000 images in it. The folder has become unmanageable. I need a script to move the images into nested folders so they are more mangeable.
Ideally, the script would copy each image and place it in a separate directory. The image should be placed in a folder based on the image file's month/year creation date (the column called Date Added on a Mac). The file's created year should be the parent folder and then each month (designated by a number 01-12) is the child folder. Files that can be categorized should be put in their own folder labeled "Error" or something like that.

For example, if I have 3 images in /images:
Filename: img1.png, Date Added: Mar 11, 2019 at 12:18am
Filename: img2.png, Date Added: Nov 14, 2022 at 8:04pm,
Filename: img3.png, Date Added: Nov 27, 2022 at 2:19pm,

I would want to run a shell script that creates the following directory:
Folder: /2019/03 with img1.png, Date Added: Mar 11, 2019 at 12:18am
Folder: /2022/11 with img2.png, Date Added: Nov 14, 2022 at 8:04pm,
img3.png, Date Added: Nov 27, 2022 at 2:19pm,

I work on a Mac so a shell script would work but please educate me on what I need. I know almost nothing about shell scripts.
Related categories: Mac OS Shell Script UNIX Powershell