How to mount a DMG image on macOS 10.15.5 that was generated by GNU's ddrescue?
ddrescue doesn't create DMG files.  Just appending .dmg to a file doesn't a DMG make.
A DMG is an Apple Disk Image file.  There are methods to create a DMG on other platforms besides macOS - How to build a dmg Mac OS X file (on a non-Mac platform)? - but you must have the ability to format the volume as HFS+ (at a minimum).  The command you used doesn't show where that was done.
You might also want to review how to create a DMG:  How do I create a DMG file from a directory? on macOS