Yes it can be done. This is a normal need most everyone has. It should be done with Migration Assistant. It is a program provided by Apple for transferring your files from your old computer to your new computer. It is very easy to use. Be sure to read and follow its instructions. Basically, the process is as follows.
You first begin by starting the process of setting up your new computer. You will be asked if you wish to transfer files. Respond YES and follow the instructions you will be given.
You will be told to turn both computers on and activate Migration Assistant in the old computer.
The computers should be connected with a USB cable to facilitate the transfer. Wi-Fi is simply not suited for a transfer of so much data and corruption often results. Do not use it. It can corrupt or lose data.
You will be given several options as to what to transfer. You will likely want to transfer your settings and preferences.
You can transfer all or none of your files. You do not have an option to select certain files to transfer. If you wish to do that, then do so manually.
The old computer's operating system will not be transferred. No data from the old computer is erased.
Allow for up to an hour for the transfer process to complete once you start it.
It should set up the new computer the same as the old one.
Enjoy your new Mac.
I hope this is helpful. Good luck.