(Legacy) PCI version can be determined only via BIOS calls, which is not possible to query under Windows.
Try to look under the SMBIOS DMI node if there's something, but this depends on whether the BIOS vendor has filled correct information.
Otherwise I assume that you have an older system and if you have DOS there too, you might try HWiNFO for DOS that should retrieve this information.
Well, it's not necessarily an older system because some AM4 boards (e.g. ASUS Prime B350-Plus and Prime X370-A) have an Asmedia PCI/PCIe bridge chip that takes one PCIe lane and uses it to connect the PCI slots.