I have just done a complete reinstall of macOS big sur 11.6 and I cannot seem to get custom folder icons to work. They just show up with a generic file icon instead:
In the Finder on your Mac, change the icon for any file or folder using your own pictures, icons from the web or icons from another file or folder.
support.apple.com
Important bit.....After you paste, if you see a generic JPEG or PNG image instead of your own picture, make sure you choose Edit > Copy before pasting.
I had the same problem and found that you have to open the icon in preview before you copy (or something like that!) but got it working just fine eventually.
Good luck!