If you are booting to a macOS 10.10 installer, then you need to partition and format the whole physical SSD using the instructions in this article since macOS 10.10 does not understand the newer drive layout or APFS file system used by macOS 10.13+:
https://www.owcdigital.com/assets/support/support-formatting-and-migration/Mac_Formatting_6-10.pdf
If your laptop uses a third party NVMe SSD, then you will need to boot into a macOS 10.13+ installer since older versions of macOS cannot recognize an NVMe SSD. When booted to a macOS 10.13+ installer you may need to click "View" within Disk Utility and select "Show All Devices" so that the physical SSD appears on the left pane of Disk Utility. Select the physical drive and erase it as GUID partition and APFS (top option). If Internet Recovery Mode (Command + Option + R) does not boot the laptop into the macOS 12.x Monterey installer, then you will need to create a bootable macOS 10.13+ USB installer using the instructions in this Apple article (I highly recommend creating a bootable macOS USB installer as it gives you more options if something goes wrong):
How to create a bootable installer for macOS - Apple Support