Apple released two 21.5" iMacs in 2017. The iMac (21.5-inch, 2017) was a price point model that had only a dual-core CPU, and no Retina display. You said you had a quad-core CPU, which implies that you have the other one.
iMac (Retina 4K, 21.5-inch, 2017) - Technical Specifications - Apple Support
----------
Simultaneously supports full native resolution on the built-in display at millions of colors (21.5-inch) or 1 billion colors (21.5-inch 4K) and:
- One 5120‑by‑2880 (5K) external display at 60Hz with support for 1 billion colors, or
- Two 3840-by-2160 (4K UHD) external displays at 60Hz with support for 1 billion colors, or
- Two 4096‑by‑2304 (4K) external displays at 60Hz with support for millions of colors
----------
Macs do not support driving two displays off a single port unless
- That port is a Thunderbolt port
- The device directly attached to it is a Thunderbolt device such as a Thunderbolt hub or dock.
So
- You could get a Thunderbolt dock, hub, or dual-display adapter that supports two non-Thunderbolt monitors and attach both monitors to it. If you go this route, I would suggest looking at offerings from Other World Computing, SonnetTech, and CalDigit.
- You could get a plain USB-C dock, attach one monitor to it, and attach the other monitor to the iMac. This would be less expensive, but wouldn't work for you if your external SSD was a Thunderbolt 3 SSD (as opposed to being a USB one).