A 27" iMac has two USB-C (Thunderbolt 3) ports and 4 USB-A ports. The USB-C ports support USB transfers at up at 10 Gbps (USB 3.1 Gen 2 speed) and the USB-A ports support USB transfers at up to 5 Gbps (USB 3.0 speed).
iMac (Retina 5K, 27-inch, 2019) - Technical Specifications
It sounds like you have a SATA SSD and a USB 2 / SATA enclosure with a USB-A plug on the end of the cable which goes to the computer. If that is a USB 2 enclosure (not a USB 3 one), it will bottleneck the performance of the SSD, and you won't be able to take full advantage even of the USB-A (USB 3) ports, much less the Thunderbolt ones.
On Amazon, you can find a number of tool-free USB 3 / SATA SSD enclosures with UASP support for about $10. If you put your SSD into one of those, you could connect it to any of your USB-A ports, or to either of your USB-C (TB) ports with a USB-C to USB-A adapter (that supports USB 3 speeds). Since these enclosures generally feature USB 3.0, there wouldn't be any speed advantage to doing it one way or the other.
Since your computer has Thunderbolt 3 ports, you could attach an extremely fast Thunderbolt 3 / PCIe NVMe SSD. But that would require the purchase of a new type of SSD, and wouldn't be nearly as inexpensive as a $10 upgrade from a USB 2 enclosure to a USB 3 enclosure.