I can't recall the exact error. Something along the lines of operation couldn't complete. Not real specific.
I went through 2 or 3 iterations of erasing the drive and attempting to install the OS. Every install failed. A couple of the erase attempts failed. I tried a couple of different instructions on the erase. I.e., you suggested APFS, which I used a few times. I also tried a scheme that was recommended elsewhere. I shut down the iMac. I unplugged the drive. I swapped cables. Nothing worked.
And then we got into the Twilight Zone. I looked at information on the drive in Disk Utility. Characteristics included Writeable: no, Available space: 0, Purgeable space: 0, Can be verified: no, Can be repaired no, Journaled: no. Not real encouraging.
I had my son plug the drive into his home built 'gamer' pc to see if it was a compatibility issue. His pc didn't see the drive. But then he got a message that there was a power surge on one of his ports. Other weird stuff happened. Yanked the drive and rebooted.
I looked at the drive you recommended. On the plus side, per the specs, it's very fast. Also, I can throw it out of my second story window, bounce it off cement into a 3 foot tall rain barrel, leave it in there for 30 minutes, fish it out, and park my car on it. Impressive. But I don't need a drive that fast. It's also kind of spendy, at around $700. I just need to store bunch of music and photos. So, am hoping for a 2 tb drive more in the $300-350 range. I'm surprised these SSDs aren't more compatible.
I might contact Western Digital on Monday, or I might just send it back. I'm guessing I received faulty hardware. However, to avoid another round of extensive troubleshooting, I'm hoping to find out what would be a reasonably priced drive that is compatible and reasonably reliable.
YouTube made it look so easy.
Thanks again for your help with this. No one should have to walk this road alone.