See this: Move your content to a new Mac - Apple Support
I recommend that you use the transfer from a Time Machine backup option. First make a Time Machine backup of your old Mac. Then connect the Time Machine backup drive to the new Mac and preferably on the very first power on of the new Mac, follow the instructions for Migration Assistant (which is also sometimes called Setup Assistant).
When migrating to the new Mac, I also suggest that you migrate only your accounts and user files, but nothing else. Install fresh all the non-Apple applications. The Apple built in applications will already be on the new Mac, but with the most recent versions.