To get files off a Mac with a broken screen you can use Migration Assistant via the following procedure.
Connect an external display to the damaged Mac.
Launch Migration Assistant on both computers.
On the new machine, choose the From a Mac, Time Machine backup, or Startup disk option.
On the damaged Mac, select the To another Mac option.
On the new Mac, select the damaged Mac as the source.
Choose the contents you want to transfer and click Continue.
Wait until the process is complete.