If you are capable of building your own computer & are able to do advanced hardware hacking (e.g. make your own parts) you could gut the iMac fit a Mac Mini and new flatscreen inside it.
Frankly that is a terrible idea unless you have lots of time & money to throw at the project. Some people do bizarre changes to old Macs…
(2016) iBook G3 Clamshell Intel i5 Upgrading Project - YouTube
It's not impossible, just very difficult & probably pointless. The iMac case is not the same aspect ratio as modern screens so you will probably end up with odd black edges etc.
This is not supported by Apple but then that is unsurprising as you have a computer that was possibly made in the last century.
NOTE:
The CRT & supporting power supply in those old iMacs contain potentially LETHAL voltages that remain after powering off. Do not attempt any repairs or alterations unless you have a clear idea how to safely work with high voltage devices. You can find some take apart advice on sites like iFixit.com for some iMac models
iMac G3 Model M5521 Teardown - iFixit