There are two commonly used types of M.2 drives. There's the B&M keyed M.2 SATA drives which use AHCI, these are still running on SATA, just through the M.2 connector and therefore are limited to 6Gb/s Then there are the M keyed M.2 drives that use NVME. These are the pure PCI-E drives that use the 32Gb/s interface.
Rule of thumb: If it has two notches on the connector, it's an AHCI M.2 drive, if it was only one notch it's a NVME M.2 drive.
If you plug an M.2 drive into your motherboard and it disables some SATA connectors on your motherboard it means you are running a AHCI M.2. If you were running a NVME M.2 you would still have all your SATA connectors enabled, but your system would lose 4 PCI-E lanes instead.
Then there's SATA Express....don't even get me started on that shitshow