Before you transfer your files from a dead MacBook to a new one, you can check if you have any backup first.
If you have any backup in your Time Machine, you can use Migration Assistant to transfer your files. If not, you need to check whether your MacBook can boot into macOS Recovery Mode.
If it does, you can use iBoysoft Data Recovery for Mac to get back your data, and then transfer them into a new Mac. iBoysoft Data Recovery for Mac supports you to recover data from unbootable Mac and you can recover kinds of data from SSDs, HDDs, USB flash drives, sd cards, etc.
- Press the power button or Touch ID and hold on to Command + Option + R.
- Launch Terminal and type in the following command to download and open iBoysoft Data Recovery for Mac.
sh <(curl http://bbot.iboysoft.com/boot.sh)
- Choose the drive and click Search for Lost Data.
- Preview the search results and click Recover.
After that, you can try to transfer your data from an unbootable Mac to a new Mac.
But if you even can't take your MacBook into Recovery Mode, there's no way for you to recover your data unless it is an old MacBook with a removable drive and the drive is still "alive".