You can get one of these but they are expensive also be aware there are SATA and nvme M.2 SSD types they are not compatible.
Although you did not mention if your old drive is also M.2. Consider a USB M.2 housing. With software you can then clone the existing drive to the new one and you can then use the old SSD in the housing as a flash drive.
If the USB port doesn’t provide enough power constantly it might have an influence. If you are on a desktop type computer use the ports on the back that are directly connected to the main board.