You don’t need to copy any files manually as other answers suggest. On both Windows and Mac you can export all your settings within MySQL Workbench and restore to another system.
Select Tools > Configuration > Backup Connections
This will export as a .zip. Then on your new new install just
Select Tools > Configuration > Restore Connections
That’s it!