That Mac shipped with optical installation media (DVDs) that must accompany it from cradle to grave. Boot from the one labeled "System Install DVD" to format the replacement SSD and install its shipping software which for that Mac would be OS X 10.6.x "Snow Leopard".
Assuming you no longer have those two grey discs, the next best option is to obtain a retail, white, Mac OS X Snow Leopard DVD. Apple no longer sells them but they can be found from aftermarket sources.
Do not purchase a "USB installer" since there can be no guarantee they don't contain malware. Besides, selling them would be violating Apple's licensing restrictions.
For unrelated reasons there is no way to install macOS from Apple's Recovery servers at present. Either their Recovery servers for older macOS versions are down (and have been for several weeks) or Apple silently removed that option. The only practicable option at the moment are those installation DVDs.
As HWTech noted the Samsung "EVO" series SSDs have been perennial problems on Macs. If they work at all, they have a tendency to fail or become abysmally slow in a short time. Slower than HDDs. You might be better off reinstalling that Mac's original hard disk drive for now.
The AMD Radion discrete GPUs are also a notorious trouble spot on that model Mac. Since they are long since out of production, replacements require harvesting them from equally old Macs, supplies of which are now practically nonexistent.