@meeran18 , welcome to the Community.
The motherboard in your computer has a M.2, socket 3, key M. The socket can be used for either SATA or NVMe. Unfortunately, HP doesn't give us the type being used. In most of their newer motherboards it is being used as NVMe, PCIe x3. I suggest that you contact WD's Tech Support to see if they can tell you if their M.2 will be compatible with your motherboard. They are the experts on their products.


I am not an HP Employee!!
Intelligence is God given. Wisdom is the sum of our mistakes!!