To retrieve data from Mac and transfer it to Mac or PC
Start up an old Mac while pressing and holding down the T key until the FireWire icon appears. Connect the old Mac to the new one with a FireWire or USB, USB-C or Thunderbolt cable. An icon of the old Mac drive just as if it was an external hard drive should appear on the desktop. Copy data across the same way as you do from an external hard drive. Apple calls it 'target disk mode'. You can even transfer data from not booting up Mac to PC this way.
It works with almost all Macs made after the year 2000 until 2020 M1 Chips.
To retrieve data from Macs with the M1 chips since 2020
First, shut down the Mac with the M1 chip and hold the power button until the 'Loading start-up options' message appears. Navigate to Options and continue to select a startup disk. Enter the admin password if prompted. Once in Recovery mode, go to Utilities and choose Share Disk. On the receiving Mac, navigate to Finder, then Network, and connect to the M1 Mac as a Guest. Don't forget to Stop Sharing on the M1 Mac after the process is complete.