Mac not bootable, save files with other mac
The more valuable the files, the slower you should be and refrain from trying command line tools on your only copy of the drive. Test with a rented Mac first to be sure you have control of the system and tools you’re using. That being said, here is general advice for anyone needing data recovery:

You can take a Mac to Apple for repair and ask they transfer the data to a drive you supply. (Pay the pros - get data maybe and a working Mac back)
You can destroy data by mounting a drive in Target Disk mode if you don’t prevent the second system from running a filesystem check. (The filesystem assumes you have a backup and restores consistency, rolling back changes and orphaning files if needed to provide a sane filesystem that accounts for space. It doesn’t set out to destroy data, but it can in some cases make things worse - why risk it?)
You can get a file recovery specialist to get your data, and save the repair expense (Pay the pros to get the data - fix the Mac later)
Reputable vendors like OWC will help you determine how feasible a storage swap is. Figure out precisely what storage costs and what surgery entails and you could be $20 of parts to remove the storage and safely try to recover files. (Pay for software and support once you run the free trial. Spend time learning)

If care to preserve the data, try booting your old Mac in target disk mode but use a write block tool like Data Rescue to safely scan the old Mac and see what is retrievable rather than letting the OS “repair” the drive.

https://www.prosofteng.com/
https://support.apple.com/guide/mac-help/transfer-files-mac-computers-target-disk-mode-mchlp1443/mac

I would exhaust all options before working on an Apple portable or try a DIY recovery effort using non-paid tools if you care about getting valuable data off. If you just want to learn and the data is low value, dive right in with https://ifxit.com and disk drill or dd - both of those are amazing tools at a low price to obtain, but in skilled or unskilled hands alike are also known as the data destroyers.