It is highly unlikely you will be able to recover any data from the failing hard drive since there are 20K bad sectors that are pending reallocation. Most normal utilities (even data recovery utilities) are not designed to work with a failing drive which produces errors. At best you may be able to use the "GNU ddrescue" command line utility available with Knoppix to perform a bit for bit clone of the hard drive to another drive of equal or larger size, but with that many Pending Sectors it could take an extremely long time (a week or more possibly). I have no idea how much of the drive can be recovered or if any of that data will be easily accessible after the process is done. Even after this bit for bit clone it may be necessary to run Disk Utility on the clone to attempt repairs to the file system or perhaps even a data recovery utility will need to be used on the clone. "GNU ddrescue" is the only utility I know of that is capable of transferring data from a failing hard drive to a good drive as it can skip past any errors to concentrate on copying the good sections of the hard drive and later go back to try to recover data from the bad sections. If "GNU ddrescue's" logging/mapping option is used the clone can be resumed if interrupted and multiple attempts can be made to recover data from the bad sections. It is very easy to make a mistake using "GNU ddrescue" when specifying the source & destination drives and when resuming a clone. There is unlikely to be any confirmed end to the cloning process as I'm sure there will be sections that will be difficult to clone. It is always a judgement call when to abort the clone and attempt to access the clone (you cannot attempt access until you are sure you are done with the clone since macOS will make changes to the cloned drive which could make a mess of things if you try to resume the clone afterwards).
Of course after the clone you will need to transfer the files from the clone to another location as you will not want to use the cloned drive after retrieving the data. After retrieving the data you will want to erase the good drive containing the clone so it can be used for normal data storage or a backup drive.
You can try contacting a professional data recovery service such as Drive Savers or Ontrack. Both vendors provide free estimates and both are recommended by Apple. However, with that many pending blocks I'm doubtful if even these professional data recovery services will be able to recover your data.
You will only get one chance at recovering the data since any attempt usually ends up making the failure even worse so choose wisely.