Your screenshot of Disk Utility and the error message shows the SSD as being an internal drive. If this is the case, then it may be the SSD adapter causing the problem, or perhaps this SSD is just not compatible with this computer or this SSD is bad.
FYI, from reading these forums for years, the most compatible & reliable internal SSD adapter for this laptop is from Sintech. I rarely see people reporting issues when using this adapter compared to other models.
The SSD adapter, dock, enclosure being used to connect the new SSD externally may also be incompatible or bad. I can tell you from personal experience....Macs can be very picky about the items used for connecting external storage.
As @Grant mentioned, sometimes you must initiate the erase of the whole physical SSD a second time immediately after the first attempt. I have seen this to be necessary even with an Apple OEM SSD. Disk Utility is a terrible app which barely functions for basic tasks.
Sometimes macOS just gets confused by the partition & file system especially if configured from another system. Sometimes it may be necessary to write zeroes to the beginning of the physical drive to destroy the partition table on it. You can either use Windows/Linux to destroy all partitions on this SSD or you can use the command line in the Terminal app, but the command line is dangerous if you are not familiar with it because there are no safety nets if you make a mistake or reference the wrong drive identifier when writing zeroes to the beginning of the drive.
You may want to check the health of the SSD by running DriveDx (has free trial period). If the SSD is connected externally, then you will need to install a special USB driver to attempt to access the SSD's health information. Even with this special USB driver, the adapter/dock/enclosure being used with the SSD may still not allow the necessary communication to access the health information on the SSD. Feel free to post the complete DriveDx text report here using the "Additional Text" icon which looks like a piece of paper since not all warnings & errors are significant for an SSD to be healthy.
Edit: That external setup looks really bad so it would not surprise me if the connection is not secure or that perhaps the SSD may be damaged by the weight bending it down. Don't let anything hang like that without some support (insulated non-conductive support item).