The easiest way is to go to settings - system - backups and create a backup which you can download.
Do the new installation to the Raspberry PI and then when it has completed you can go into settings - system - backups and upload your previous backup and then restore from there.
That works a lot better than trying to copy over config directories.