If the hard drive is failing, then you need to proceed very carefully because the more you use the failing drive and attempt to copy data the worse the drive failure will become where even a professional data recovery service will be unable to recover any data.
If you can connect this laptop to another computer (Mac, Windows, or Linux) using Target Disk Mode or if you can remove the drive and use an USB to SATA Adapter, drive dock, or enclosure, then you can check the health of the hard drive using the other computer.
Another option is to boot a Linux USB drive to check the health of the hard drive.
I can provide instructions to each of these methods if you let me know which one is best for you. This will confirm the drive failure and also let us know how bad the drive failure is. For a minor drive failure you may be able to copy off most of your data, but for a more severe failure normal apps & utilities will not work since they cannot handle the errors from the failing hard drive. Even data recovery software is unable to handle these errors. macOS also has trouble dealing with these errors as well. If macOS is reporting a drive failure, then I suspect the failure is severe since macOS is unable to detect the failure in its early stages.
The best time to make a backup is before you have a problem. Backups are meant to make it easier for you to recover from a hardware failure or mistakenly deleting/modifying a file.