m.2 is a form factor, or really sort of a family of form factors.
SATA and NVMe are protocols and interfaces. In m.2, there are 12 key indexes. Drives use indexes B and M. m.2 support both NVMe and SATA. NVMe drives for m.2 are keyed at index M. M.2 SATA drives are keyed at B or often both B and M.
m.2 supports SATA and NVME, sometimes but not always in the same slot. For NVMe speeds, you need an NVMe drive. Those come in PCIe x2 and PCIe x4 at PCIe 3.x and PCIe 4.0 revisions of the standard. The drive and slot must both support this. m.2 SATA 3 drives don't have two cables to them like a 2.5" SATA 3 drive usually does. It goes in an m.2 slot that supports SATA and is keyed appropriatly.
m.2 also has various lengths: 40mm, 60mm, and 80mm. Some drives are up to 110mm and many boards provide for that. The "2260", "2280" and so on are drive sizes, 22m by the length.
m.2 also supports non-drive cards like GPS, Bluetooth, WLAN, WWAN, or NFC.
Another, earlier than m.2, standard allowed drives with a SATA interface on a card with no cables. That was known as mSATA.
But assuming that NVMe and SATA SSD controllers emit the same energy, it makes more sense that NVMe would be hotter.
Think about it. If you throw a ball of high heat meat would it cool faster if it was connected to a large body of water (SSD with its chasis) or a small body of water (NVMe small piece of plastic that is the NVMe)?
Another thing to check if your NVMe either has proper thermal pads placement and/or if the air from the front coolers is reaching it.
Which is ironic because NVMe was supposed to be more efficient and doing less work because it's design wasn't bound with SATA&spinning assumptions and controller doesn't need to handle pcie-SATA conversions since it's directly connected to the bus etc.
One problem with m.2 is the spec would permit a module with the controller on the bottom where it would be difficult to cool. But I think so far nobody has been dumb enough to ship one.
There's also the location of the temperature probe, it doesn't need to be much further away from the heat source to register drastically lower temperatures in either case.