Some motherboards will only have one M.2 slot that can run at NVMe bandwidth, whereas others may be restricted to using SATA bandwidth.
Some motherboards’ M.2 slots may even support solely SATA bandwidth, which greatly limits your choice of M.2 SSD but makes your choice of slot basically irrelevant.