Macs can be very particular about the USB sticks used for booting. I've found that many USB sticks are of very poor quality (sometimes even name brand ones). If you have a spare external drive you could use it as the installer drive (it may actually be faster & more reliable than a USB stick).
What is the make and model of the SSD you installed? Is the SSD a standard SATA SSD or is it a PCIe SSD? Not all SSDs are compatible with Macs.
macOS can be very particular with the installed hardware. I've encountered a few newer Macs where macOS will not run at all due to a hardware issue, whereas I can install and run Linux perfectly fine on the same system.
To see if the system firmware has been updated by the macOS installer create a bootable Knoppix Linux USB drive using Etcher (Mac/Windows/Linux). Get Knoppix v8.2 instead of v8.6 since I've had issues with the new release. Option Boot the Knoppix USB drive and select the orange icon labeled "EFI". While Knoppix boots the system may appear to be frozen on the Apple boot picker menu so give Knoppix lots of time to finish booting.
Once Knoppix boots open a terminal app (icon should be on the lower left of the Taskbar). I'm not sure which specific command will give you the system BootROM version, but one of these two should include it although it may not be listed as "BootROM". The system firmware should appear either in the format of "iMacX,Y.xxxxxx" for the old style or something like an IP address "186.0.0.0.0" for the new style.
sudo dmidecode -t bios
sudo dmidecode -t system
Is the original hard drive in working condition? If so does it still work in this computer? If so, then I would recommend cloning the original drive using Carbon Copy Cloner and see if the new SSD will boot Ok as this will eliminate any macOS installer issues.
If the original drive no longer works, then you may have other issues. You may want to run a memory check using Memtest86. You can use Etcher to create a bootable Memtest86 USB drive. Can you boot the Apple Diagnostics on this computer (I'm not sure if this one allows booting to the online diagnostic, but it is worth a shot).