Not just with development environments, but all computer configuration, I stick with the defaults as much as possible. Instead of changing the configuration of the computer, I change myself.

For example, let's say an app has a default keyboard shortcut I don't like. I won't change it. Instead, I'll just get used to it until it becomes muscle memory.

Now the default configurations are my preferred configurations. Of course, there are still a few things I change from the defaults. But since there are so few I can just configure them by hand, because how often am I setting up a new computer? Not very often. And there are so few config changes, it only takes a minute.

The only thing I have to actually sync is my vim config. It's a very small config, but it's still more than nothing. I just store it in a Git repository.

Yeah, my macOS set-up is simple enough it's not worth scripting or otherwise saving.

Use the GUI settings panel to make CAPS LOCK an extra ctrl. Takes maybe 10 seconds.

Use same to make dock auto-hide. 10 seconds if I'm slow about it.

Install Homebrew. Maybe 15 seconds hands-on and a couple minutes in the background.

Use Homebrew to install spectacle. Less than 5 seconds hands-on time, done less than a minute later.

Start Spectacle and use its preferences panel to set it to start on boot. Maybe 15 seconds.

Remove all the pinned programs on the dock. 60-90 seconds.

The last one's the only part I've considered scripting, but since I only do it once every couple years at most, it's not really worth it.

Once I'm past a Mac's initial "welcome to Mac" flow and on the actual desktop, I'm only about 5 minutes (not all of it actively doing things) from having a comfortable environment set up and being all ready to install project-specific tools, as needed.

If I ever switch back to Linux (or FreeBSD, which is more likely at this point) I might go back to versioning and backing up a bunch of config and dot files. I need them, there.

Just as a sidenote, because I was using Spectacle as well. JFYI: As it is no longer maintained, I switched to Rectangle (https://github.com/rxhanson/Rectangle) and can highly recommend it.