Can I turn an old iMac (early 2008) into an external monitor
I believe this should be possible. However, you cannot do this without changing the hardware of the computer. What you can keep though is the display and the housing. You need to take the rest of the computer out and take a look at the back or side of the display. Somewhere around there or on the display's flex cable you should be able to find a code which you can use to buy a compatible inverter board on the internet (just google or search on eBay, it should not be this hard). Now you need to plug your display flex cable into the inverter board. Then you will find a DVI/HDMI/VGA port on the inverter board, depending on which one you bought, which you need to lead to the outside (p.e. with an adapter cable). Now you can plug your computer into the port and use the iMac as a display.
Some German guy did something similar with a modern 5k iMac with the only difference being that he bought the housing and the display specifically for it instead of recycling a Mac. Even though you probably do not speak German, this might give you a better idea of how it is done: https://youtu.be/hzTVe6aVgww
And there is also an English video where someone tried this with a Windows laptop: https://youtu.be/CfirQC99xPc
Good luck! It is always better to try to reuse old and broken electronics instead of throwing them away!