Linux tends to do a better job of handling hardware errors than macOS where macOS is like a dog with a bone....macOS refuses to quit. Plus macOS may be trying to scan the drive before mounting.
Before doing anything else, you need to check if the drive is failing. This is easiest to do using Linux. Ubuntu should have easy access to the GSmartControl app (either installed by default or available in the repository). Post the complete health report from GSmartControl here (there is a button for Saving the Report in the app so you can copy & paste the contents). I can examine the report to see if the drive is failing and how badly.
If you do not have a backup, then stop right now. Don't even try to have macOS read the drive or the drive failure will get worse to the point where even a professional data recovery service will not be able to recover any data. macOS and most regular apps are not able to deal with all the I/O errors produced by a failing drive. Even many data recovery apps don't handle errors (at least they never used to)...data recovery apps are usually designed to recovered accidentally deleted data from a working drive, not a failing drive.
If the drive is failing:
If the data is really important, then I highly recommend you contact a professional data recovery service such as Drive Savers. Drive Savers provides free estimates and is recommended by Apple and other OEMs.
If the data is not important enough to pay for the professional recovery, then you can attempt to clone the drive yourself using a Linux command line utility which is able to deal with the errors produced by a failing drive. You will need another drive the same or larger size though, plus another drive to actually store any data recovered from the clone. Once data is recovered, then you can erase the clone to use it as a data drive or backup drive. I can provide the name of the utility if you are not interested in a professional data recovery service.
You usually only get one chance at recovering data from a failing drive, so choose wisely.
People should always have frequent and regular backups of their computer and all external media (including the cloud) which contains important & unique data.