Well… It’s not that simple here😞
The 2017 series was a transitional year! The 18.1 model is a carry over from the 2015 (1.6GHz 21.5" Late 2015) but still a bit different! Then we have the 18.2 models which have the 4K displays. So if you have the 18.1 as you’ve indicated here you don’t have a choice as it’s a 18.1 system and that’s it.
* [https://everymac.com/systems/apple/imac/specs/imac-core-i5-2.3-21-inch-aluminum-mid-2017-specs.html|18.1 iMac system]
* [https://everymac.com/ultimate-mac-lookup/?search_keywords=iMac18,2|18.2 iMac systems]
The reason you are limited is the older display uses a different interface than the newer 4K models. So the connections are not compatible internally.