If your board has more than one M.2 slot, as most do these days, you'll first want to figure out which slot to install it in.
If your board has more than one M.2 slot, as most do these days, you'll first want to figure out which slot to install it in. Depending on the type of drive (SATA or PCIe / NVME) and the compatibility of the slots, some M.2 drives won't work or won't fit in some M.2 slots. You'll also want to make sure if you have a fast PCIe 4.0 or 5.0 SSD, that it goes into the fastest slot on your board. Consult your manual, which will tell you what types of drives your board's M.2 slots support. But as a general rule, if your boot drive is PCIe, you should install it in the M.2 slot closest to the CPU.