You can clone it with clonezilla, or with dd if you’re feeling particularly ballsy.
If your boot sectors are on the m.2 and you clone to it then you’ll overwrite them though, which is no bueno; and I’m not entirely sure how to fix that, but I’m sure there is a way.
EDIT:
You can use grub-install to do it, from a live USB.
I’d make a full clone of your SSD to a third drive (external?) and then try adding boot sectors to your SSD, then set it as the boot device in your BIOS/UEFI. If it boots successfully, you’re good to clone it to the m.2. If not, restore that backup and do some googling! (Hell, I’d do it anyway just to verify my advice…)