Why I can't output video through second PCIe slot with AM4 processor on X370GT7?

If you are using RYZEN it should not be any problem, there are APU limitation with 7th Gen A-series processor, please refer to below image:

With 7th Gen A-series processor the second PCIe processor will be unavailable, please plug in the first(PEX16_1) slot