What should I look for when buying an SSD for an iMac?
Your model iMac has a Serial ATA (6 Gb/s) connector for a 2.5" hard drive and a PCIe connector (PCIe 2.0 x4 NVMexpress interface) for the SSD.

For best compatibility I suggest you purchase your SSD from a reputable retailer. For example, the following are some well-regarded sites:


Mac Sales 
Simply Mac
RAM City
Macfixit


By buying from a reputable store you'll be sure to get an SSD fit for purpose, regardless of manufacturer. Being reputable means they're only going to sell something that works and they'll stand behind the product they sell, regardless of the brand.

Also, many sites offer an easy interface to ensure you select the right SSD for your particular Mac.