Prepare an icon image
Use your own artwork or a file from a creator who permits your intended use. A square image with a transparent background is often easier to recognize than a rectangular photo. Open the image in Preview and copy its image content. Copying a file from Finder can produce a different result.
Paste into the small icon
Select your folder in Finder. Open File > Get Info, select the small icon at the top of that window, then choose Edit > Paste. The large Preview section is not the paste target. Try the process on a normal folder you created first.
Use native colors when they are enough
On macOS versions with Customize Folder, select a folder and open its Action menu. The available color, symbol, or emoji options can provide a consistent system without an icon pack. Special system folders have additional restrictions. If you only need a palette match, begin with these controls.
Fix a failed paste
If Paste is unavailable, select the small icon at the top of Get Info again. If the result is a generic image-file icon, return to Preview and copy the image content. Check that the file contains the actual icon artwork rather than a shop preview or an icon sheet.
Restore the original
Open Get Info again, select the small icon, then choose Edit > Cut. Keep your source artwork elsewhere so you can reuse it. Changing the icon does not change the folder name or move its files.