Rewriting a BIOS is no small task, ESPECIALLY if you are trying to add a component(s) that the board isn't designed to handle. You could cause damage to said m.2 port or even cause damage to the entire board itself.
My guess would be also populating components for a voltage regulator module to provide power to the M.2 at a minimum. The M.2 pattern looks to be intended for a WiFi card (check the RefDes) so you'd also need to add interface circuitry and antenna connections to the board. If your plan is to use it for an NVME it wouldn't work since the interfaces and data traces to the CPU or chipset/PCH are missing from a WiFi M.2 connector, something 10 times more difficult than even hacking your BIOS would be.
If doing it for WiFi, just get a USB WiFi and call it a day.