You left out a lot of critical details including the exact make & model of the SSD, plus I'm assuming it is most likely an M.2 SSD which means an SSD Adapter as well. Plus the version of macOS installer you are booting & installing.
Regardless of the third party SSD being used, you will need to be booting from a macOS 10.13+ installer in order for the third party NVMe SSD to be seen. And, at some point in the past you must have installed macOS 10.13+ so that the system firmware has been updated to work with an NVMe SSD. You can try booting into Internet Recovery Mode using Command + Option + R to see if you can access the online macOS Monterey installer. Unfortunately some Macs may only boot to the older online installer for the version of macOS which originally shipped with the Mac from the factory which will be too old to work with an NVMe internal SSD.
If you have access to another working Mac generally from Late-2009 to mid-2022, then you can create a bootable macOS USB installer. Depending on the exact model of the other Mac this will allow you to create a bootable macOS 10.13 to 12.x USB installer.
Not all SSDs are compatible with all devices. And if you are using an M.2 SSD, then the most reliable & compatible SSD adapter is from Sintech. OWC sells a drop in replacement SSD that does not require any adapters, but still requires using macOS 10.13+. And OWC is the only reputable vendor that will provide any tech support for a third party internal SSD in a Mac.