Apple released a couple of 21.5" iMacs in 2017 – a Retina model (iMac18,2), and a non-Retina model (iMac18,1).
Other World Computing has internal drives for those Macs, and because your iMac came with a Fusion Drive, it would have a place to install a "circuit board stick" SSD.
Other World Computing – OWC Solid State Drives For iMac 21.5-Inch (Late 2013 - 2019)
However, note that replacing the internal drives on these Macs is a job for a repair shop. You have to cut open a sealed display, almost completely disassemble the Mac, install the new drives, then reassemble the Mac.
Your Mac has USB-A (USB 3.0) and USB-C (USB 3.1 Gen 2, Thunderbolt 3) ports which should let you use a wide range of external SSDs. Getting an external SSD, cloning your startup drive to it, and then using that SSD as your startup drive wouldn't involve paying a repair shop a lot to do surgery on your Mac, or taking the risk of doing the delicate surgery yourself.