capacity of the drive is not the issue. It is the technology. 2 types of M.2 SSD. SATA or PCIe/NVME. You may notice some have a 3-prong interface and some have a 2-prong interface. You can install a WD Blue or Samsung 860 Evo of any capacity. I have seen 4 TB SSDs and you could install one of them. The HP you asked about is an NVME and will not work in your laptop.
Be alert for scammers posting fake support phone numbers and/or email addresses on the community. If you think you have received a fake HP Support message, please report it to us by clicking on "Flag Post".