If the files are already in subfolders, then you need to have Hazel go into subfolders to get at them. Search the help for "subfolders" on how to do that.
From there, you can use a custom date attribute (search the help for that if you don't know what that is) to match the date in the name. Once you have that, you can re-sort the file into a subfolder based on that custom date attribute. When using the date in the Sort pattern, you can click on it to edit the format. There, you can specify it only use the year and month.