The i5 9500 does not support HDMI 2.0 natively, only HDMI 1.4.
With HDMI 1.4 is not possible to use 1080p @ 165Hz, in fact, I think even 1080p @ 144Hz is not possible either as both of those resolutions will exceed the available bandwidth for HDMI 1.4.
For this CPU, 1080p @ 165Hz would be possible only via DisplayPort (DP 1.2/+)...
Now, your motherboard may have HDMI 2.0 if they are converting an internal DisplayPort connection to HDM 2.0 standard using an LSPCON Chip. With this HDMI 2.0 via LSPCON, it could be possible to get 1080p 165Hz.
However, in that case, what you want to do is ask your motherboard support team what the maximum resolution and refresh rate is supported by the board, because now you would be relying on the specs/quality of that LSPCON chip...
Most of the GT 1030 cards I have seen come with HDMI 2.0, so they should be able to handle 1080p 165Hz, unless it has HDMI 1.4 instead, or if it a "cheaper version of a GT 1030".
Megan is right on target here. For HDMI 1.4, the maximum possible 1080p connection is 144Hz. Considering how close this is to the limit (8.00Gb/s requirement vs. 8.16Gb/s support), I can see it falling back to 120Hz if the cable and connection aren't perfect (my rule: don't use cables that come with monitors; they are typically junk). For DisplayPort 1.2, provided you have HBR2 (or better) cables, you should be able to achieve 165Hz.
My Gigabyte GT1030 card supports HDMI 2.0; I have a 4K@60Hz monitor connection.
Hope this helps,