From what I've found when looking up this issues for the OP, is that HP support will likely tell you to go to the HP ProDesk 400 G6 SFF product Data sheet PDF, the Customer Support - Knowledge Base or the Maintenance and Service Guide (manual) PDF.
https://www8.hp.com/h20195/v2/GetPDF.aspx/4AA7-5819ENUC.pdf
Specifications page for HP ProDesk 400 G6 Small Form Factor Business PC Specifications.
support.hp.com
http://h10032.www1.hp.com/ctg/Manual/c06513590
The power supply is only 180watt, and the PCIE x16 slot likely only supplies 35watts. So a GTX 1050TI or 1650 are not an option. The GT 1030 GDDR5 version is the safest option that will work within spec. The AMD Radeon RX550X 4GB LP is also an option as it's listed on the documents and the card uses around 40-45watts, so the PCIE x16 slot might be 45-50watt capable.