180W is risky. I believe I have looked up that model before and it really does have close to a 180W rating.
Even if we assume a maximum of 75W from the GPU, and 65W from the CPU, that is 140W, and we haven't looked at the CPU fan, case fan, hard drive, and any peripherals you plug in.
Any long gaming session is going to heat the system up, and the efficiency on the supply will worsen. Best case it works for a year, worst case it blows up during a long gaming sessions and takes the computer with it.
If you must keep the HP chassis, buy this:
https://parts.hp.com/hpparts/Search...2C63A&SearchIn=PartNumber&SearchPN=L03980-800
A 310W supply that should fit in there.
Otherwise, it is best to look at getting a new chassis, a standard ATX power supply, and an adapter cable to plug it in. Not sure if there is an adapter for this relatively new model, but there might be.