Very, very limited information available regarding that board.
If that's from a 50-157nf, that I suspect it is.... it's a Skylake-era i5 setup?
It *should* be fine, on that alone.
From what I can find:
https://h30434.www3.hp.com/t5/Desktop-Hardware-and-Upgrade-Questions/Odense-2B47-motherboard-manual/td-p/5767012
You might need to disable secure boot.
Biggest problem I could think of, is the PSU - typically,. the includes PSUs are capable for stock operations (ie what it shipped with from the factory) and not a bunch more.
180W unit shipped with that system, powering an R5 330 - and 18W part.
You're talking about replacing with a 75W TDP card.
With an i5-6400 + 1050TI, you've got a max power draw in the ~150W range.
Might be doable on that PSU, might not..... I really can't find much on it.
I think this might be (or be very similar to) the motherboard in question? If so, it uses a standard 24pin ATX and 4pin EPS connector(s), so the PSU could be replaced (although you may have to transplant into another case to fit an ATX PSU if it's a non-standard size).
https://support.hp.com/ca-en/document/c04790427