Other Users have had the same problem when either upgrading the AMD CPU or CPU Cooler on a customized HP Computer motherboard.
The Motherboard seems to be compatible with Intel type CPU Coolers that requires a square connection to the motherboard.
AMD CPU Coolers are rectangular in area for connecting to the motherboard.
If your HP came with a AMD CPU Cooler stealth installed, can't you use the same mounting on the Prism? Or is the AMD CPU Cooler customized with a special mounting so that it will fit a Intel type motherboard?
This YouTube video shows how to install the AMD Wraith Prism which seems to use a rectangular mounting: How to Install an AMD Wraith Prism CPU Cooler - YouTube
I would highly suggest you open a HP Support ticket or post your question at HP Forum to see what they suggest as a upgrade in replacing your CPU Cooler.
Maybe HP has a CPU Cooler kit to be able to install AMD CPU Coolers.
EDIT: Reread your original Post. I see that you aware of the Intel type mounting. Trouble with trying to install an Intel type mounted CPU Cooler is if it will make a good connection to the Ryzen Processor. This is something that I don't know nor have information on.
I believe you should still open a HP Support ticket to find out what is the best CPU Cooler for the Ryzen 2700X which has a TDP of 105 watts. Which means you need to get a CPU Cooler with at least 150 watt TDP. See if Cooler Master Hyper 212 EVO (150 watt TDP) will fit with a Intel mounting kit or a liquid CPU Cooler may be best for the 2700X processor.
This Cooler Master charts show all the CPU Cooler they have with which type of board and Socket it fits: https://landing.coolermaster.com/pages/tdp-and-socket-compatibility/
Note: The chart used to indicate the TDP ratings but now seems like Cooler Master has deleted that information for some reason. I do know that the Hyper 212 evo has a rating of 150 watts TDP.
I tried to look at that solution but no, it doesnt work , it's rectangular, and my motherboard got "square attachment" (HP suck big time about this)
thanks a lot for your answer , I just saw that intel processors got attached in a square way, I need to know for what type of socket it would come close...
"If your HP came with a AMD CPU Cooler stealth installed, can't you use the same mounting on the Prism? Or is the AMD CPU Cooler customized with a special mounting so that it will fit a Intel type motherboard?"
it's my mistake, I thought it was a wraith but in fact I just saw its an HP fan of some sort (a model that sucks) and it's attached in a square connection...way to go HP! I don't understand why they are doing that when on the page of my model it says that I can upgrade to a 2700x!
there's no way that sh*tty fan could support 105W...
so yes it's close to in Intel...need to know now what kind is it