You cannot replace a conventional “Hard drive” in this model iMac.
DO NOT attempt this upgrade until you understand two important facts:
1) The drive in your iMac MUST BE a ‘SSD’ or a ‘Fusion drive’. If it is a conventional HDD, stop. There is NO PCIe CONNECTOR inside to connect a new blade drive.
2) Click on the link in this iFixit for "clone your existing hard drive". All the more recent Apple CPU's are now classified as 'T2 secure chips'. Cloning is no longer straightforward, e.g. "Hold down Opt key during restart, etc." You have to bypass/disable certain security features on your iMac, and this is somewhat of a lengthy process. If you do not, when you try to boot from an external drive you will see nothing but a black screen.
Excellent step by step guide, thank you. I will definitely refer to this when I upgrade my 250G SSD which, BTW, is WAY too small. There's only 100G left, and only apps are Logic Pro X, Numbers/Keynote/Pages, iTunes & a few utilities... hardly any actual work