Hi, no it's not. The nvme SSD on the logic board is using a proprietary connector, not m.2. There are adapters online but many of them caused issues in MacBooks, defo would not recommend fitting that to an iMac, where it's super difficult to troubleshoot later. Either just fit a standard sata SSD or you would need to get an Apple SSD.
www.thebookyard.com