Is the BIOS upgraded? Is the M.2 drive possibly too modern and not backwards compatible with whatever that old laptop supports? Also possible the firmware of the drive has issues with the laptop.
Basic question but did you try formatting it on another machine first?
Since it doesn't even get recognised during the install process that sounds like a hardware or firmware issue to me but worth giving the formatting a go.
