Chosen Solution

In order to buy the best m.2 ssd for this iMac, I would like to know if this can support PCIe 4.0 or it’s just the regular PCIe 3.0?

I don’t recommend M.2 SSD’s in iMac’s. You should use the custom Apple SSD’s. Here’s a good guide The Ultimate Guide to Apple’s Proprietary SSDs