You would have to change out the supporting chipset, too.
Other than that mod (highly unlikely to ever happen), the 2019 iMac does not support PCIe 4, let alone PCIe 5.
As mentioned above, PCIe 4 should clock down to PCIe 3. I suppose PCIe 5 will also clock down, but unknown for sure.
(The chipset/bus does not magically upgrade to PCIe 5, just because you plug a newer device into a socket... You get PCIe 3, as that is what the chipset (and the logic board) is designed to support.
You won't get anywhere close to the advertised speed on a PCIe 5 device.