There is no practical way to use that iMac as an external monitor.
The iMac (21.5-inch, Mid 2014) does support Target Display Mode – and is the last Mac to do so. However, Apple added restrictions to Target Display Mode such that no current, or even recent, Mac supports using any iMac as a Target Display. You'd need $80+ in specialized Thunderbolt adapter and cabling hardware to make a Thunderbolt data connection, just to find out that while a Thunderbolt connection is necessary, it is not sufficient.
See the bad news here: Use your iMac as a display with target display mode - Apple Support
That iMac is also too old to be an AirPlay Receiver for AirPlay to Mac, a lower-quality way of using a Mac's screen as a second display.
Given that you can get some decent, if basic, 27" 2560x1440 and 3840x2160 monitors for $300 – $400, I can't see spending much on third-party workarounds (that may involve various compromises) to reuse the 1920x1080 screen.