My motherboard has two M.2 slots, but they share a PCIE gen3 lane.
If I put SSDs in both, and they are both NVME, (I could put a sata SSD in one of them) they both drop down to gen2 speeds as the lane gets bifurcated in order for both slots to work at the same time.
In my case, my mother board manual actually DOESN'T mention this, so I had to find out the hard way when I plonked in a second drive. I did check when I bought the mobo because I knew this is common, but oh well.